Submission #108321

# Submission time Handle Problem Language Result Execution time Memory
108321 2019-04-28T14:02:49 Z polyfish Gap (APIO16_gap) C++14
0 / 100
71 ms 2888 KB
#include "gap.h"
#include <bits/stdc++.h>

using namespace std;

const long long INF = 1e18;

long long subtask1(int N) {
    long long l = -INF, r = INF;
    long long res = 0;

    while (l<r) {
        long long mn, mx;
        MinMax(l+1, r-1, &mn, &mx);
        if (mx==-1)
            break;
        if (l!=-INF)
            res = max(res, max(mn-l, r-mx));
        l = mn;
        r = mx;
    }

    return res;
}

long long findGap(int T, int N) {
    if (T==1)
        return subtask1(N);
//    else
//        return subtask2(N);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 384 KB Output isn't correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 2 ms 384 KB Output is correct
6 Incorrect 2 ms 384 KB Output isn't correct
7 Incorrect 2 ms 384 KB Output isn't correct
8 Incorrect 2 ms 384 KB Output isn't correct
9 Incorrect 3 ms 384 KB Output isn't correct
10 Runtime error 2 ms 384 KB Execution failed because the return code was nonzero
11 Incorrect 4 ms 384 KB Output isn't correct
12 Incorrect 3 ms 384 KB Output isn't correct
13 Incorrect 3 ms 384 KB Output isn't correct
14 Incorrect 3 ms 384 KB Output isn't correct
15 Incorrect 3 ms 384 KB Output isn't correct
16 Incorrect 15 ms 896 KB Output isn't correct
17 Incorrect 15 ms 768 KB Output isn't correct
18 Incorrect 20 ms 768 KB Output isn't correct
19 Incorrect 15 ms 768 KB Output isn't correct
20 Runtime error 10 ms 512 KB Execution failed because the return code was nonzero
21 Incorrect 48 ms 2816 KB Output isn't correct
22 Incorrect 50 ms 2688 KB Output isn't correct
23 Incorrect 53 ms 2808 KB Output isn't correct
24 Incorrect 71 ms 2792 KB Output isn't correct
25 Incorrect 44 ms 2176 KB Output isn't correct
26 Incorrect 56 ms 2796 KB Output isn't correct
27 Incorrect 55 ms 2680 KB Output isn't correct
28 Incorrect 48 ms 2788 KB Output isn't correct
29 Incorrect 47 ms 2808 KB Output isn't correct
30 Runtime error 36 ms 1676 KB Execution failed because the return code was nonzero
31 Incorrect 3 ms 384 KB Output isn't correct
32 Correct 2 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 256 KB Output isn't correct
2 Incorrect 3 ms 360 KB Output isn't correct
3 Incorrect 3 ms 384 KB Output isn't correct
4 Incorrect 2 ms 384 KB Output isn't correct
5 Incorrect 2 ms 384 KB Output isn't correct
6 Incorrect 3 ms 384 KB Output isn't correct
7 Incorrect 2 ms 384 KB Output isn't correct
8 Incorrect 2 ms 384 KB Output isn't correct
9 Incorrect 3 ms 384 KB Output isn't correct
10 Incorrect 2 ms 384 KB Output isn't correct
11 Incorrect 3 ms 384 KB Output isn't correct
12 Incorrect 2 ms 384 KB Output isn't correct
13 Incorrect 3 ms 384 KB Output isn't correct
14 Incorrect 2 ms 384 KB Output isn't correct
15 Incorrect 3 ms 384 KB Output isn't correct
16 Incorrect 9 ms 768 KB Output isn't correct
17 Incorrect 8 ms 768 KB Output isn't correct
18 Incorrect 9 ms 768 KB Output isn't correct
19 Incorrect 9 ms 768 KB Output isn't correct
20 Incorrect 5 ms 512 KB Output isn't correct
21 Incorrect 32 ms 2888 KB Output isn't correct
22 Incorrect 56 ms 2808 KB Output isn't correct
23 Incorrect 32 ms 2716 KB Output isn't correct
24 Incorrect 32 ms 2680 KB Output isn't correct
25 Incorrect 22 ms 2176 KB Output isn't correct
26 Incorrect 31 ms 2680 KB Output isn't correct
27 Incorrect 30 ms 2684 KB Output isn't correct
28 Incorrect 42 ms 2748 KB Output isn't correct
29 Incorrect 27 ms 2808 KB Output isn't correct
30 Incorrect 17 ms 1664 KB Output isn't correct
31 Incorrect 2 ms 384 KB Output isn't correct
32 Incorrect 2 ms 384 KB Output isn't correct