Submission #108323

# Submission time Handle Problem Language Result Execution time Memory
108323 2019-04-28T14:04:04 Z polyfish Gap (APIO16_gap) C++14
0 / 100
53 ms 1152 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;
    }
    res = max(res, r-l);

    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 2 ms 384 KB Output isn't correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 3 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 3 ms 256 KB Output isn't correct
9 Incorrect 2 ms 384 KB Output isn't correct
10 Runtime error 3 ms 384 KB Execution failed because the return code was nonzero
11 Incorrect 3 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 2 ms 384 KB Output isn't correct
16 Incorrect 12 ms 512 KB Output isn't correct
17 Incorrect 12 ms 512 KB Output isn't correct
18 Incorrect 14 ms 512 KB Output isn't correct
19 Incorrect 14 ms 640 KB Output isn't correct
20 Runtime error 22 ms 512 KB Execution failed because the return code was nonzero
21 Incorrect 49 ms 1144 KB Output isn't correct
22 Incorrect 49 ms 1152 KB Output isn't correct
23 Incorrect 46 ms 1144 KB Output isn't correct
24 Incorrect 47 ms 1144 KB Output isn't correct
25 Incorrect 42 ms 1152 KB Output isn't correct
26 Incorrect 51 ms 1152 KB Output isn't correct
27 Incorrect 50 ms 1144 KB Output isn't correct
28 Incorrect 53 ms 1144 KB Output isn't correct
29 Incorrect 47 ms 1152 KB Output isn't correct
30 Runtime error 35 ms 1152 KB Execution failed because the return code was nonzero
31 Incorrect 2 ms 384 KB Output isn't correct
32 Correct 2 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Incorrect 2 ms 384 KB Output isn't correct
4 Incorrect 3 ms 384 KB Output isn't correct
5 Incorrect 2 ms 384 KB Output isn't 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 2 ms 384 KB Output isn't correct
10 Incorrect 2 ms 384 KB Output isn't correct
11 Incorrect 2 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 4 ms 384 KB Output isn't correct
16 Incorrect 8 ms 512 KB Output isn't correct
17 Incorrect 7 ms 508 KB Output isn't correct
18 Incorrect 7 ms 512 KB Output isn't correct
19 Incorrect 11 ms 512 KB Output isn't correct
20 Incorrect 5 ms 512 KB Output isn't correct
21 Incorrect 25 ms 1148 KB Output isn't correct
22 Incorrect 33 ms 1144 KB Output isn't correct
23 Incorrect 25 ms 1152 KB Output isn't correct
24 Incorrect 24 ms 1144 KB Output isn't correct
25 Incorrect 45 ms 1144 KB Output isn't correct
26 Incorrect 31 ms 1144 KB Output isn't correct
27 Incorrect 35 ms 1144 KB Output isn't correct
28 Incorrect 35 ms 1144 KB Output isn't correct
29 Incorrect 28 ms 1144 KB Output isn't correct
30 Incorrect 14 ms 1152 KB Output isn't correct
31 Incorrect 3 ms 384 KB Output isn't correct
32 Incorrect 2 ms 384 KB Output isn't correct