#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);
s=arr[i]=mn;
t=arr[N-1-i]=mx;
}
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 |
2 ms |
256 KB |
Output is correct |
2 |
Incorrect |
2 ms |
352 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
404 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
256 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 |
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 |
348 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
16 |
Incorrect |
9 ms |
708 KB |
Output isn't correct |
17 |
Incorrect |
10 ms |
624 KB |
Output isn't correct |
18 |
Incorrect |
10 ms |
740 KB |
Output isn't correct |
19 |
Incorrect |
9 ms |
680 KB |
Output isn't correct |
20 |
Incorrect |
6 ms |
632 KB |
Output isn't correct |
21 |
Incorrect |
33 ms |
1876 KB |
Output isn't correct |
22 |
Incorrect |
32 ms |
1892 KB |
Output isn't correct |
23 |
Incorrect |
32 ms |
1908 KB |
Output isn't correct |
24 |
Incorrect |
32 ms |
1928 KB |
Output isn't correct |
25 |
Incorrect |
26 ms |
1832 KB |
Output isn't correct |
26 |
Incorrect |
33 ms |
1812 KB |
Output isn't correct |
27 |
Incorrect |
34 ms |
1884 KB |
Output isn't correct |
28 |
Incorrect |
63 ms |
1912 KB |
Output isn't correct |
29 |
Incorrect |
31 ms |
1912 KB |
Output isn't correct |
30 |
Incorrect |
21 ms |
1896 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
348 KB |
Output is correct |
2 |
Incorrect |
2 ms |
368 KB |
Output isn't correct |
3 |
Incorrect |
2 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 |
1 ms |
256 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
256 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
376 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
376 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 |
9 ms |
632 KB |
Output isn't correct |
17 |
Incorrect |
9 ms |
632 KB |
Output isn't correct |
18 |
Incorrect |
9 ms |
632 KB |
Output isn't correct |
19 |
Incorrect |
9 ms |
632 KB |
Output isn't correct |
20 |
Incorrect |
6 ms |
632 KB |
Output isn't correct |
21 |
Incorrect |
32 ms |
1812 KB |
Expected int32, but "5000050000" found |
22 |
Incorrect |
32 ms |
1912 KB |
Expected int32, but "5000050000" found |
23 |
Incorrect |
32 ms |
1912 KB |
Expected int32, but "5000050000" found |
24 |
Incorrect |
32 ms |
1912 KB |
Expected int32, but "5000050000" found |
25 |
Incorrect |
37 ms |
1912 KB |
Expected int32, but "5000050000" found |
26 |
Incorrect |
32 ms |
1912 KB |
Expected int32, but "5000050000" found |
27 |
Incorrect |
50 ms |
1932 KB |
Expected int32, but "5000050000" found |
28 |
Incorrect |
32 ms |
1912 KB |
Expected int32, but "5000050000" found |
29 |
Incorrect |
34 ms |
1912 KB |
Expected int32, but "5000050000" found |
30 |
Incorrect |
22 ms |
1912 KB |
Expected int32, but "5000050000" found |
31 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |