#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
long long findGap(int T, int N) {
set<long long> a;
long long mn = 0, mx = 1e18;
for (int i=0;i<(N+1)/2;i++) {
MinMax(mn, mx, &mn, &mx);
a.insert(mn);
a.insert(mx);
}
vector<long long> b;
for (long long x:a)b.push_back(x);
long long dif = 0;
for (int i=1;i<N;i++) {
dif = max(dif, b[i] - b[i-1]);
}
return dif;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
12 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
13 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
16 |
Runtime error |
5 ms |
876 KB |
Execution killed with signal 11 |
17 |
Runtime error |
5 ms |
856 KB |
Execution killed with signal 11 |
18 |
Runtime error |
7 ms |
800 KB |
Execution killed with signal 11 |
19 |
Runtime error |
7 ms |
900 KB |
Execution killed with signal 11 |
20 |
Runtime error |
4 ms |
856 KB |
Execution killed with signal 11 |
21 |
Runtime error |
19 ms |
2136 KB |
Execution killed with signal 11 |
22 |
Runtime error |
18 ms |
2128 KB |
Execution killed with signal 11 |
23 |
Runtime error |
19 ms |
2136 KB |
Execution killed with signal 11 |
24 |
Runtime error |
24 ms |
2136 KB |
Execution killed with signal 11 |
25 |
Runtime error |
23 ms |
1968 KB |
Execution killed with signal 11 |
26 |
Runtime error |
19 ms |
2136 KB |
Execution killed with signal 11 |
27 |
Runtime error |
18 ms |
2136 KB |
Execution killed with signal 11 |
28 |
Runtime error |
18 ms |
2136 KB |
Execution killed with signal 11 |
29 |
Runtime error |
19 ms |
1992 KB |
Execution killed with signal 11 |
30 |
Runtime error |
19 ms |
2136 KB |
Execution killed with signal 11 |
31 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
11 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
12 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
13 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
14 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
15 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
16 |
Runtime error |
7 ms |
856 KB |
Execution killed with signal 11 |
17 |
Runtime error |
5 ms |
856 KB |
Execution killed with signal 11 |
18 |
Runtime error |
5 ms |
856 KB |
Execution killed with signal 11 |
19 |
Runtime error |
5 ms |
856 KB |
Execution killed with signal 11 |
20 |
Runtime error |
4 ms |
856 KB |
Execution killed with signal 11 |
21 |
Runtime error |
20 ms |
1996 KB |
Execution killed with signal 11 |
22 |
Runtime error |
19 ms |
2004 KB |
Execution killed with signal 11 |
23 |
Runtime error |
19 ms |
2004 KB |
Execution killed with signal 11 |
24 |
Runtime error |
18 ms |
2152 KB |
Execution killed with signal 11 |
25 |
Runtime error |
23 ms |
2136 KB |
Execution killed with signal 11 |
26 |
Runtime error |
24 ms |
2060 KB |
Execution killed with signal 11 |
27 |
Runtime error |
19 ms |
2136 KB |
Execution killed with signal 11 |
28 |
Runtime error |
20 ms |
2136 KB |
Execution killed with signal 11 |
29 |
Runtime error |
19 ms |
2136 KB |
Execution killed with signal 11 |
30 |
Runtime error |
15 ms |
2004 KB |
Execution killed with signal 11 |
31 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |