Language: C++



import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;

public class Main {
    public static void main(String[] args) {
        PrintWriter out = new PrintWriter(System.out);
        FastScanner sc = new FastScanner();
        Strategy strategy = new MyStrategy();
        strategy.solve(out, sc);
        out.flush();
    }
}

class MyStrategy implements Strategy {
    @Override
    public void solve(PrintWriter out, FastScanner sc) {
        int N = sc.nextInt();
        int M = sc.nextInt();
        if (N == M) {
            out.println("Yes");
        } else {
            out.println("No");
        }

    }
}

interface Strategy {
    void solve(PrintWriter out, FastScanner sc);
}

class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}


Compiler output:
a.cc:19:5: error: stray '@' in program
   19 |     @Override
      |     ^
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.IOException;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.io.InputStream;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.NoSuchElementException;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: expected unqualified-id before 'public'
    8 | public class Main {
      | ^~~~~~
a.cc:18:29: error: expected initializer before 'Strategy'
   18 | class MyStrategy implements Strategy {
      |                             ^~~~~~~~
a.cc:32:1: error: 'interface' does not name a type
   32 | interface Strategy {
      | ^~~~~~~~~
a.cc:37:12: error: expected ':' before 'final'
   37 |     private final InputStream in = System.in;
      |            ^~~~~~
      |            :
a.cc:37:13: error: 'final' does not name a type
   37 |     private final InputStream in = System.in;
      |             ^~~~~
a.cc:38:12: error: expected ':' before 'final'
   38 |     private final byte[] buffer = new byte[1024];
      |            ^~~~~~
      |            :
a.cc:38:13: error: 'final' does not name a type
   38 |     private final byte[] buffer = new byte[1024];
      |             ^~~~~
a.cc:39:12: error: expected ':' before 'int'
   39 |     private int ptr = 0;
      |            ^~~~
      |            :
a.cc:40:12: error: expected ':' before 'int'
   40 |     private int buflen = 0;
      |            ^~~~
      |            :
a.cc:41:12: error: expected ':' before 'boolean'
   41 |     private boolean hasNextByte() {
      |            ^~~~~~~~
      |            :
a.cc:41:13: error: 'boolean' does not name a type; did you mean 'bool'?
   41 |     private boolean hasNextByte() {
      |             ^~~~~~~
      |             bool
a.cc:57:12: error: expected ':' before 'int'
   57 |     private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |            ^~~~
      |            :
a.cc:58:12: error: expected ':' before 'static'
   58 |     private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
      |            ^~~~~~~
      |            :
a.cc:58:20: error: 'boolean' does not name a type; did you mean 'bool'?
   58 |     private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
      |                    ^~~~~~~
      |                    bool
a.cc:59:11: error: expected ':' before 'boolean'
   59 |     public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
      |           ^~~~~~~~
      |           :
a.cc:59:12: error: 'boolean' does not name a type; did you mean 'bool'?
   59 |     public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
      |            ^~~~~~~
      |            bool
a.cc:60:11: error: expected ':' before 'String'
   60 |     public String next() {
      |           ^~~~~~~
      |           :
a.cc:60:12: error: 'String' does not name a type
   60 |     public String next() {
      |            ^~~~~~
a.cc:70:11: error: expected ':' before 'long'
   70 |     public long nextLong() {
      |           ^~~~~
      |           :
a.cc:94:11: error: expected ':' before 'int'
   94 |     public int nextInt() {
      |           ^~~~
      |           :
a.cc:99:11: error: expected ':' before 'double'
   99 |     public double nextDouble() { return Double.parseDouble(next());}
      |           ^~~~~~~
      |           :
a.cc:100:2: error: expected ';' after class definition
  100 | }
      |  ^
      |  ;
a.cc: In member function 'int FastScanner::readByte()':
a.cc:57:34: error: 'hasNextByte' was not declared in this scope
   57 |     private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |                                  ^~~~~~~~~~~
a.cc:57:56: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
   57 |     private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |                                                        ^~~~~~
      |                                                        buflen
a.cc: In member function 'long int FastScanner::nextLong()':
a.cc:71:14: error: 'hasNext' was not declared in this scope
   71 |         if (!hasNext()) throw new NoSuchElementException();
      |              ^~~~~~~
a.cc:71:35: error: expected type-specifier before 'NoSuchElementException'
   71 |         if (!hasNext()) throw new NoSuchElementException();
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
a.cc:73:9: error: 'boolean' was not declared in this scope; did you mean 'bool'?
   73 |         boolean minus = false;
      |         ^~~~~~~
      |         bool
a.cc:76:13: error: 'minus' was not declared in this scope
   76 |             minus = true;
      |             ^~~~~
a.cc:80:23: error: expected type-specifier before 'NumberFormatException'
   80 |             throw new NumberFormatException();
      |                       ^~~~~~~~~~~~~~~~~~~~~
a.cc:86:34: error: 'isPrintableChar' was not declared in this scope
   86 |             }else if(b == -1 || !isPrintableChar(b)){
      |                                  ^~~~~~~~~~~~~~~
a.cc:87:24: error: 'minus' was not declared in this scope
   87 |                 return minus ? -n : n;
      |                        ^~~~~
a.cc:89:27: error: expected type-specifier before 'NumberFormatException'
   89 |                 throw new NumberFormatException();
      |                           ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'int FastScanner::nextInt()':
a.cc:96:18: error: 'Integer' was not declared in this scope
   96 |         if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
      |                  ^~~~~~~
a.cc:96:73: error: expected type-specifier before 'NumberFormatException'
   96 |         if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
      |                                                                         ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'double FastScanner::nextDouble()':
a.cc:99:41: error: 'Double' was not declared in this scope; did you mean 'double'?
   99 |     public double nextDouble() { return Double.parseDouble(next());}
      |                                         ^~~~~~
      |                                         double
a.cc:99:60: error: 'next' was not declared in this scope; did you mean 'nextInt'?
   99 |     public double nextDouble() { return Double.parseDouble(next());}
      |                                                            ^~~~
      |                                                            nextInt