#include "gap.h"
#include <algorithm>
using namespace std;
long long findGap(int T, int N){
long long arr[N];
for(int i=0;i<(N+1)/2;i++){
long long s=0, t=1000000000000000000, mn, mx;
MinMax(s, t, &mn, &mx);
arr[i]=mn;
s=mn+1;
arr[N-1-i]=mx;
t=mx-1;
}
long long diff=0;
for(int i=1;i<N;i++){
diff=max(diff, arr[i]-arr[i-1]);
}
return diff;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
256 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
256 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 |
2 ms |
376 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
16 |
Incorrect |
10 ms |
1100 KB |
Output isn't correct |
17 |
Incorrect |
10 ms |
1120 KB |
Output isn't correct |
18 |
Incorrect |
10 ms |
1144 KB |
Output isn't correct |
19 |
Incorrect |
9 ms |
1144 KB |
Output isn't correct |
20 |
Incorrect |
6 ms |
760 KB |
Output isn't correct |
21 |
Incorrect |
32 ms |
3192 KB |
Output isn't correct |
22 |
Incorrect |
34 ms |
3192 KB |
Output isn't correct |
23 |
Incorrect |
33 ms |
3192 KB |
Output isn't correct |
24 |
Incorrect |
33 ms |
3192 KB |
Output isn't correct |
25 |
Incorrect |
27 ms |
2808 KB |
Output isn't correct |
26 |
Incorrect |
33 ms |
3192 KB |
Output isn't correct |
27 |
Incorrect |
32 ms |
3216 KB |
Output isn't correct |
28 |
Incorrect |
33 ms |
3192 KB |
Output isn't correct |
29 |
Incorrect |
34 ms |
3292 KB |
Output isn't correct |
30 |
Incorrect |
21 ms |
2552 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
376 KB |
Output is correct |
2 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
256 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 |
380 KB |
Output isn't correct |
7 |
Incorrect |
1 ms |
256 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
376 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
376 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
380 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
16 |
Incorrect |
10 ms |
1144 KB |
Output isn't correct |
17 |
Incorrect |
9 ms |
1144 KB |
Output isn't correct |
18 |
Incorrect |
9 ms |
1144 KB |
Output isn't correct |
19 |
Incorrect |
9 ms |
1144 KB |
Output isn't correct |
20 |
Incorrect |
6 ms |
888 KB |
Output isn't correct |
21 |
Incorrect |
57 ms |
3312 KB |
Expected int32, but "5000050000" found |
22 |
Incorrect |
33 ms |
3208 KB |
Expected int32, but "5000050000" found |
23 |
Incorrect |
33 ms |
3188 KB |
Expected int32, but "5000050000" found |
24 |
Incorrect |
32 ms |
3272 KB |
Expected int32, but "5000050000" found |
25 |
Incorrect |
26 ms |
2808 KB |
Expected int32, but "5000050000" found |
26 |
Incorrect |
33 ms |
3320 KB |
Expected int32, but "5000050000" found |
27 |
Incorrect |
33 ms |
3192 KB |
Expected int32, but "5000050000" found |
28 |
Incorrect |
33 ms |
3192 KB |
Expected int32, but "5000050000" found |
29 |
Incorrect |
32 ms |
3192 KB |
Expected int32, but "5000050000" found |
30 |
Incorrect |
21 ms |
2524 KB |
Expected int32, but "5000050000" found |
31 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
32 |
Incorrect |
1 ms |
256 KB |
Output isn't correct |