Submission #302602

#TimeUsernameProblemLanguageResultExecution timeMemory
302602ASD3DCarnival Tickets (IOI20_tickets)Java
Compilation error
0 ms0 KiB
public static int find_maximum(int k, int[][] x) { int ans = 0; for (int i = 0; i < x.length; i++) { ans += x[i][0]; } ans -= x.length * x[x.length/2][0]; int[][] s = new int[x.length][1]; allocate_tickets(s); return ans; }

Compilation message (stderr)

tickets.java:1: error: class, interface, or enum expected
public static int find_maximum(int k, int[][] x) {
              ^
tickets.java:3: error: class, interface, or enum expected
    for (int i = 0; i < x.length; i++) {
    ^
tickets.java:3: error: class, interface, or enum expected
    for (int i = 0; i < x.length; i++) {
                    ^
tickets.java:3: error: class, interface, or enum expected
    for (int i = 0; i < x.length; i++) {
                                  ^
tickets.java:5: error: class, interface, or enum expected
    }
    ^
tickets.java:7: error: class, interface, or enum expected
    int[][] s = new int[x.length][1];
    ^
tickets.java:8: error: class, interface, or enum expected
    allocate_tickets(s);
    ^
tickets.java:9: error: class, interface, or enum expected
    return ans;
    ^
tickets.java:10: error: class, interface, or enum expected
}
^
9 errors