Submission #198617

#TimeUsernameProblemLanguageResultExecution timeMemory
198617ijxjdjdBitaro the Brave (JOI19_ho_t1)Java
Compilation error
0 ms0 KiB
public class joi2019_ho_t1 { static BufferedReader fin = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; public static void main(String[] args) throws IOException { st = new StringTokenizer(fin.readLine()); int H = Integer.parseInt(st.nextToken()); int W = Integer.parseInt(st.nextToken()); char[][] board = new char[H][W]; for (int i = 0; i < H; i++) { board[i] = new StringTokenizer(fin.readLine()).nextToken().toCharArray(); } int[] countI = new int[W]; int[] countO = new int[H]; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { if (board[i][j] == 'O') { countO[i]++; } else if (board[i][j] == 'I') { countI[j]++; } } } long res = 0; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { if (board[i][j] == 'J') { res += countI[j]*countO[i]; } else if (board[i][j] == 'O') { countO[i]--; } else { countI[j]--; } } } PrintWriter out = new PrintWriter(System.out); out.println(res); out.close(); } }

Compilation message (stderr)

joi2019_ho_t1.java:2: error: cannot find symbol
    static BufferedReader fin = new BufferedReader(new InputStreamReader(System.in));
           ^
  symbol:   class BufferedReader
  location: class joi2019_ho_t1
joi2019_ho_t1.java:3: error: cannot find symbol
    static StringTokenizer st;
           ^
  symbol:   class StringTokenizer
  location: class joi2019_ho_t1
joi2019_ho_t1.java:4: error: cannot find symbol
    public static void main(String[] args) throws IOException {
                                                  ^
  symbol:   class IOException
  location: class joi2019_ho_t1
joi2019_ho_t1.java:2: error: cannot find symbol
    static BufferedReader fin = new BufferedReader(new InputStreamReader(System.in));
                                    ^
  symbol:   class BufferedReader
  location: class joi2019_ho_t1
joi2019_ho_t1.java:2: error: cannot find symbol
    static BufferedReader fin = new BufferedReader(new InputStreamReader(System.in));
                                                       ^
  symbol:   class InputStreamReader
  location: class joi2019_ho_t1
joi2019_ho_t1.java:5: error: cannot find symbol
        st = new StringTokenizer(fin.readLine());
                 ^
  symbol:   class StringTokenizer
  location: class joi2019_ho_t1
joi2019_ho_t1.java:10: error: cannot find symbol
            board[i] = new StringTokenizer(fin.readLine()).nextToken().toCharArray();
                           ^
  symbol:   class StringTokenizer
  location: class joi2019_ho_t1
joi2019_ho_t1.java:38: error: cannot find symbol
        PrintWriter out = new PrintWriter(System.out);
        ^
  symbol:   class PrintWriter
  location: class joi2019_ho_t1
joi2019_ho_t1.java:38: error: cannot find symbol
        PrintWriter out = new PrintWriter(System.out);
                              ^
  symbol:   class PrintWriter
  location: class joi2019_ho_t1
9 errors