#include "gap.h"
#include<bits/stdc++.h>
#define fori(a,b,c) for(int a=b; a<c; a++)
#define ford(a,b,c) for(int a=b; a>=c; a--)
#define ll long long
#define pb push_back
#define mp make_pair
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;
long long findGap(int T, int N)
{
//if(T==1){
ll lmn=-1, lmx=1000000000000000001;
ll ans=0;
fori(i,0,(N+1)/2){
ll mn,mx;
MinMax(lmn+1,lmx-1,&mn,&mx);
if(i!=0){
ans=max(ans,mn-lmn);
ans=max(ans,lmx-mx);
}
if(i==(N+1)/2-1){
ans=max(ans,mx-mn);
}
lmn=mn;
lmx=mx;
cout << ans << " " << i << " " << endl;
}
return ans;
//}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
2 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
3 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
4 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
5 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
6 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
7 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
8 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
9 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
10 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
11 |
Incorrect |
3 ms |
5144 KB |
Expected EOLN |
12 |
Incorrect |
6 ms |
5144 KB |
Expected EOLN |
13 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
14 |
Incorrect |
3 ms |
5144 KB |
Expected EOLN |
15 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
16 |
Incorrect |
33 ms |
5144 KB |
Expected EOLN |
17 |
Incorrect |
36 ms |
5144 KB |
Expected EOLN |
18 |
Incorrect |
26 ms |
5144 KB |
Expected EOLN |
19 |
Incorrect |
23 ms |
5144 KB |
Expected EOLN |
20 |
Incorrect |
39 ms |
5144 KB |
Expected EOLN |
21 |
Incorrect |
163 ms |
5144 KB |
Expected EOLN |
22 |
Incorrect |
153 ms |
5144 KB |
Expected EOLN |
23 |
Incorrect |
113 ms |
5144 KB |
Expected EOLN |
24 |
Incorrect |
153 ms |
5144 KB |
Expected EOLN |
25 |
Incorrect |
199 ms |
5144 KB |
Expected EOLN |
26 |
Incorrect |
133 ms |
5144 KB |
Expected EOLN |
27 |
Incorrect |
123 ms |
5144 KB |
Expected EOLN |
28 |
Incorrect |
106 ms |
5144 KB |
Expected EOLN |
29 |
Incorrect |
143 ms |
5144 KB |
Expected EOLN |
30 |
Incorrect |
113 ms |
5144 KB |
Expected EOLN |
31 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
32 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
2 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
3 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
4 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
5 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
6 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
7 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
8 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
9 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
10 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
11 |
Incorrect |
6 ms |
5144 KB |
Expected EOLN |
12 |
Incorrect |
3 ms |
5144 KB |
Expected EOLN |
13 |
Incorrect |
3 ms |
5144 KB |
Expected EOLN |
14 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
15 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
16 |
Incorrect |
36 ms |
5144 KB |
Expected EOLN |
17 |
Incorrect |
23 ms |
5144 KB |
Expected EOLN |
18 |
Incorrect |
26 ms |
5144 KB |
Expected EOLN |
19 |
Incorrect |
23 ms |
5144 KB |
Expected EOLN |
20 |
Incorrect |
43 ms |
5144 KB |
Expected EOLN |
21 |
Incorrect |
169 ms |
5144 KB |
Expected EOLN |
22 |
Incorrect |
129 ms |
5144 KB |
Expected EOLN |
23 |
Incorrect |
123 ms |
5144 KB |
Expected EOLN |
24 |
Incorrect |
93 ms |
5144 KB |
Expected EOLN |
25 |
Incorrect |
159 ms |
5144 KB |
Expected EOLN |
26 |
Incorrect |
126 ms |
5144 KB |
Expected EOLN |
27 |
Incorrect |
129 ms |
5144 KB |
Expected EOLN |
28 |
Incorrect |
126 ms |
5144 KB |
Expected EOLN |
29 |
Incorrect |
89 ms |
5144 KB |
Expected EOLN |
30 |
Incorrect |
109 ms |
5144 KB |
Expected EOLN |
31 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |
32 |
Incorrect |
0 ms |
5144 KB |
Expected EOLN |