Submission #172260

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1722602019-12-31 22:33:14ijxjdjdArranging Shoes (IOI19_shoes)Java
Compilation error
0 ms0 KiB
public class shoes {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
shoe solver = new shoe();
solver.solve(1, in, out);
out.close();
}
static class shoe {
public void solve(int testNumber, InputReader in, PrintWriter out) {
int N = in.nextInt();
ArrayDeque<Integer>[] left = new ArrayDeque[N];
ArrayDeque<Integer>[] right = new ArrayDeque[N];
for (int i = 0; i < N; i++) {
left[i] = new ArrayDeque<>();
right[i] = new ArrayDeque<>();
}
FenwickTree unset = new FenwickTree(2 * N);
for (int i = 0; i < 2 * N; i++) {
int a = in.nextInt();
if (a < 0) {
left[(-a) - 1].add(i);
} else {
right[a - 1].add(i);
}
unset.add(i, 1);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

shoes.java:13: error: cannot find symbol
        public void solve(int testNumber, InputReader in, PrintWriter out) {
                                                          ^
  symbol:   class PrintWriter
  location: class shoe
shoes.java:59: error: cannot find symbol
        public BufferedReader reader;
               ^
  symbol:   class BufferedReader
  location: class InputReader
shoes.java:60: error: cannot find symbol
        public StringTokenizer tokenizer;
               ^
  symbol:   class StringTokenizer
  location: class InputReader
shoes.java:62: error: cannot find symbol
        public InputReader(InputStream stream) {
                           ^
  symbol:   class InputStream
  location: class InputReader
shoes.java:3: error: cannot find symbol
        InputStream inputStream = System.in;
        ^
  symbol:   class InputStream
  location: class shoes
shoes.java:4: error: cannot find symbol
        OutputStream outputStream = System.out;
        ^
  symbol:   class OutputStream
  location: class shoes
shoes.java:6: error: cannot find symbol
        PrintWriter out = new PrintWriter(outputStream);
        ^
  symbol:   class PrintWriter
  location: class shoes
shoes.java:6: error: cannot find symbol
        PrintWriter out = new PrintWriter(outputStream);
                              ^
  symbol:   class PrintWriter
  location: class shoes
shoes.java:15: error: cannot find symbol
            ArrayDeque<Integer>[] left = new ArrayDeque[N];
            ^
  symbol:   class ArrayDeque
  location: class shoe
shoes.java:15: error: cannot find symbol
            ArrayDeque<Integer>[] left = new ArrayDeque[N];
                                             ^
  symbol:   class ArrayDeque
  location: class shoe
shoes.java:16: error: cannot find symbol
            ArrayDeque<Integer>[] right = new ArrayDeque[N];
            ^
  symbol:   class ArrayDeque
  location: class shoe
shoes.java:16: error: cannot find symbol
            ArrayDeque<Integer>[] right = new ArrayDeque[N];
                                              ^
  symbol:   class ArrayDeque
  location: class shoe
shoes.java:18: error: cannot find symbol
                left[i] = new ArrayDeque<>();
                              ^
  symbol:   class ArrayDeque
  location: class shoe
shoes.java:19: error: cannot find symbol
                right[i] = new ArrayDeque<>();
                               ^
  symbol:   class ArrayDeque
  location: class shoe
shoes.java:32: error: cannot find symbol
            PriorityQueue<int[]> next = new PriorityQueue<>(new Comparator<int[]>() {
            ^
  symbol:   class PriorityQueue
  location: class shoe
shoes.java:32: error: cannot find symbol
            PriorityQueue<int[]> next = new PriorityQueue<>(new Comparator<int[]>() {
                                            ^
  symbol:   class PriorityQueue
  location: class shoe
shoes.java:32: error: cannot find symbol
            PriorityQueue<int[]> next = new PriorityQueue<>(new Comparator<int[]>() {
                                                                ^
  symbol:   class Comparator
  location: class shoe
shoes.java:63: error: cannot find symbol
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
                         ^
  symbol:   class BufferedReader
  location: class InputReader
shoes.java:63: error: cannot find symbol
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
                                            ^
  symbol:   class InputStreamReader
  location: class InputReader
shoes.java:70: error: cannot find symbol
                    tokenizer = new StringTokenizer(reader.readLine());
                                    ^
  symbol:   class StringTokenizer
  location: class InputReader
shoes.java:71: error: cannot find symbol
                } catch (IOException e) {
                         ^
  symbol:   class IOException
  location: class InputReader
grader.java:23: error: cannot find symbol
		long result = solver.count_swaps(S);
		                    ^
  symbol:   method count_swaps(int[])
  location: variable solver of type shoes
22 errors