#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int MN=2e6;
ll arr[MN];
long long findGap(int T, int N){
int l=0,r=N-1;
ll s=0,t=1e18;
while(1){
ll mn,mx;
MinMax(s,t,&mn,&mx);
arr[l]=mn;
arr[r]=mx;
s=mn;
t=mx;
l++;
r--;
if(l+1==r or l==r)break;
}
ll ans=0;
for(int i=1;i<N;i++){
ans=max(ans,arr[i]-arr[i-1]);
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 11 |
2 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
6 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
10 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
2388 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
16 |
Incorrect |
5 ms |
4696 KB |
Output isn't correct |
17 |
Incorrect |
5 ms |
4696 KB |
Output isn't correct |
18 |
Incorrect |
5 ms |
4696 KB |
Output isn't correct |
19 |
Incorrect |
5 ms |
4696 KB |
Output isn't correct |
20 |
Incorrect |
4 ms |
4696 KB |
Output isn't correct |
21 |
Incorrect |
26 ms |
5056 KB |
Output isn't correct |
22 |
Incorrect |
18 ms |
4984 KB |
Output isn't correct |
23 |
Incorrect |
28 ms |
5092 KB |
Output isn't correct |
24 |
Incorrect |
18 ms |
4952 KB |
Output isn't correct |
25 |
Incorrect |
22 ms |
4952 KB |
Output isn't correct |
26 |
Incorrect |
23 ms |
5088 KB |
Output isn't correct |
27 |
Incorrect |
21 ms |
4952 KB |
Output isn't correct |
28 |
Incorrect |
18 ms |
4952 KB |
Output isn't correct |
29 |
Incorrect |
18 ms |
4952 KB |
Output isn't correct |
30 |
Incorrect |
13 ms |
4952 KB |
Output isn't correct |
31 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 11 |
2 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
3 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
8 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
2388 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |
16 |
Incorrect |
5 ms |
4640 KB |
Output isn't correct |
17 |
Incorrect |
7 ms |
4696 KB |
Output isn't correct |
18 |
Incorrect |
5 ms |
4696 KB |
Output isn't correct |
19 |
Incorrect |
5 ms |
4696 KB |
Output isn't correct |
20 |
Incorrect |
4 ms |
4624 KB |
Output isn't correct |
21 |
Incorrect |
18 ms |
4952 KB |
Expected int32, but "4999949999" found |
22 |
Incorrect |
18 ms |
4952 KB |
Expected int32, but "4999949999" found |
23 |
Incorrect |
18 ms |
4952 KB |
Expected int32, but "4999949999" found |
24 |
Incorrect |
18 ms |
4952 KB |
Expected int32, but "4999949999" found |
25 |
Incorrect |
17 ms |
4952 KB |
Expected int32, but "4999949999" found |
26 |
Incorrect |
24 ms |
4952 KB |
Expected int32, but "4999949999" found |
27 |
Incorrect |
25 ms |
5048 KB |
Expected int32, but "4999949999" found |
28 |
Incorrect |
19 ms |
4952 KB |
Expected int32, but "4999949999" found |
29 |
Incorrect |
26 ms |
4952 KB |
Expected int32, but "4999949999" found |
30 |
Incorrect |
13 ms |
4952 KB |
Expected int32, but "4999949999" found |
31 |
Incorrect |
0 ms |
2392 KB |
Output isn't correct |
32 |
Incorrect |
1 ms |
2392 KB |
Output isn't correct |