Submission #95583

# Submission time Handle Problem Language Result Execution time Memory
95583 2019-02-02T06:18:09 Z jeff Gap (APIO16_gap) C++14
0 / 100
79 ms 1240 KB
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;

long long findGap(int T, int N) {
    long long l, r, z, iv, ls = -1, rs = 0, a, b, i;
    MinMax(0, 1000000000000000000, &l, &r);
    z = l;
    iv = max((r - l) / N, 1LL);
    for (i = 0; i < N; ++i) {
        a = z + i * iv;
        b = z + (i + 1) * iv;
        MinMax(a, b, &l, &r);
        if (l < 0 && r < 0) continue;
        if (ls > -1) rs = max(rs, l - ls);
        ls = r;
    }
	return rs;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Incorrect 2 ms 376 KB Output isn't correct
5 Incorrect 2 ms 376 KB Output isn't correct
6 Incorrect 2 ms 376 KB Output isn't correct
7 Incorrect 2 ms 376 KB Output isn't correct
8 Incorrect 2 ms 376 KB Output isn't correct
9 Incorrect 2 ms 376 KB Output isn't correct
10 Incorrect 2 ms 348 KB Output isn't correct
11 Incorrect 2 ms 376 KB Output isn't correct
12 Incorrect 2 ms 376 KB Output isn't correct
13 Incorrect 2 ms 376 KB Output isn't correct
14 Incorrect 3 ms 348 KB Output isn't correct
15 Incorrect 3 ms 376 KB Output isn't correct
16 Incorrect 16 ms 504 KB Output isn't correct
17 Incorrect 17 ms 504 KB Output isn't correct
18 Incorrect 17 ms 576 KB Output isn't correct
19 Incorrect 16 ms 504 KB Output isn't correct
20 Incorrect 8 ms 520 KB Output isn't correct
21 Incorrect 63 ms 1160 KB Output isn't correct
22 Incorrect 66 ms 1160 KB Output isn't correct
23 Incorrect 66 ms 1144 KB Output isn't correct
24 Incorrect 65 ms 1108 KB Output isn't correct
25 Incorrect 59 ms 1196 KB Output isn't correct
26 Incorrect 64 ms 1172 KB Output isn't correct
27 Incorrect 63 ms 1144 KB Output isn't correct
28 Incorrect 63 ms 1144 KB Output isn't correct
29 Incorrect 66 ms 1144 KB Output isn't correct
30 Incorrect 32 ms 1164 KB Output isn't correct
31 Incorrect 2 ms 376 KB Output isn't correct
32 Incorrect 2 ms 376 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 292 KB Output is correct
10 Incorrect 2 ms 376 KB Output isn't correct
11 Correct 2 ms 376 KB Output is correct
12 Correct 2 ms 376 KB Output is correct
13 Correct 2 ms 376 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 2 ms 376 KB Output is correct
16 Correct 16 ms 504 KB Output is correct
17 Correct 16 ms 508 KB Output is correct
18 Correct 17 ms 504 KB Output is correct
19 Correct 17 ms 476 KB Output is correct
20 Incorrect 8 ms 504 KB Output isn't correct
21 Correct 63 ms 1160 KB Output is correct
22 Correct 64 ms 1144 KB Output is correct
23 Correct 63 ms 1052 KB Output is correct
24 Correct 64 ms 1144 KB Output is correct
25 Correct 58 ms 1220 KB Output is correct
26 Correct 65 ms 1144 KB Output is correct
27 Correct 63 ms 1152 KB Output is correct
28 Correct 79 ms 1240 KB Output is correct
29 Correct 64 ms 1144 KB Output is correct
30 Incorrect 32 ms 1144 KB Output isn't correct
31 Incorrect 2 ms 380 KB Output isn't correct
32 Correct 2 ms 376 KB Output is correct