Submission #95581

# Submission time Handle Problem Language Result Execution time Memory
95581 2019-02-02T06:17:04 Z jeff Gap (APIO16_gap) C++14
44.6028 / 100
188 ms 1912 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 - 1, 1LL);
    for (i = 0; i < N * 2; ++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 376 KB Output isn't correct
2 Incorrect 1 ms 376 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Incorrect 2 ms 380 KB Output isn't correct
5 Incorrect 2 ms 424 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 348 KB Output isn't correct
9 Incorrect 2 ms 376 KB Output isn't correct
10 Incorrect 2 ms 376 KB Output isn't correct
11 Incorrect 3 ms 376 KB Output isn't correct
12 Incorrect 3 ms 348 KB Output isn't correct
13 Incorrect 3 ms 376 KB Output isn't correct
14 Incorrect 3 ms 468 KB Output isn't correct
15 Incorrect 3 ms 376 KB Output isn't correct
16 Incorrect 20 ms 888 KB Output isn't correct
17 Incorrect 20 ms 904 KB Output isn't correct
18 Incorrect 22 ms 916 KB Output isn't correct
19 Incorrect 20 ms 892 KB Output isn't correct
20 Incorrect 12 ms 676 KB Output isn't correct
21 Incorrect 82 ms 1816 KB Output isn't correct
22 Incorrect 80 ms 1784 KB Output isn't correct
23 Incorrect 86 ms 1788 KB Output isn't correct
24 Incorrect 188 ms 1848 KB Output isn't correct
25 Incorrect 74 ms 1528 KB Output isn't correct
26 Incorrect 103 ms 1912 KB Output isn't correct
27 Incorrect 81 ms 1796 KB Output isn't correct
28 Incorrect 81 ms 1784 KB Output isn't correct
29 Incorrect 78 ms 1852 KB Output isn't correct
30 Incorrect 49 ms 1480 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 Partially correct 2 ms 336 KB Partially correct
2 Partially correct 2 ms 376 KB Partially correct
3 Partially correct 2 ms 376 KB Partially correct
4 Partially correct 2 ms 376 KB Partially correct
5 Partially correct 2 ms 376 KB Partially correct
6 Partially correct 2 ms 376 KB Partially correct
7 Partially correct 2 ms 376 KB Partially correct
8 Partially correct 2 ms 376 KB Partially correct
9 Partially correct 2 ms 348 KB Partially correct
10 Partially correct 2 ms 296 KB Partially correct
11 Partially correct 3 ms 376 KB Partially correct
12 Partially correct 3 ms 348 KB Partially correct
13 Partially correct 3 ms 392 KB Partially correct
14 Partially correct 3 ms 376 KB Partially correct
15 Partially correct 3 ms 380 KB Partially correct
16 Partially correct 21 ms 860 KB Partially correct
17 Partially correct 20 ms 784 KB Partially correct
18 Partially correct 20 ms 888 KB Partially correct
19 Partially correct 20 ms 888 KB Partially correct
20 Partially correct 12 ms 704 KB Partially correct
21 Partially correct 79 ms 1812 KB Partially correct
22 Partially correct 79 ms 1804 KB Partially correct
23 Partially correct 80 ms 1700 KB Partially correct
24 Partially correct 82 ms 1808 KB Partially correct
25 Partially correct 75 ms 1660 KB Partially correct
26 Partially correct 82 ms 1784 KB Partially correct
27 Partially correct 84 ms 1816 KB Partially correct
28 Partially correct 79 ms 1784 KB Partially correct
29 Partially correct 80 ms 1816 KB Partially correct
30 Partially correct 48 ms 1528 KB Partially correct
31 Partially correct 2 ms 376 KB Partially correct
32 Partially correct 2 ms 292 KB Partially correct