#include "gap.h"
#include<bits/stdc++.h>
using namespace std;
map<long long,bool> vis;
vector<long long> v;
long long findGap(int T, int N)
{
long long ans = 0 ;
long long s,e;
MinMax(0,1e18,&s,&e);
long long step = (e-s)/(N-1);
ans = step;
long long mn,mx;
for(long long i = s+step;i<=e;){
MinMax(s,i,&mn,&mx);
if (mx != s){
s = mx;
i = s+step;
}
else{
MinMax(i,i+1,&mn,&mx);
ans = max(ans,(mn-s));
step = ans;
i = mn+step;
}
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
5144 KB |
Output isn't correct |
2 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
3 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
4 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
5 |
Incorrect |
0 ms |
5144 KB |
Output isn't correct |
6 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
7 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
8 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
9 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
10 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
11 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
12 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
13 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
14 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
15 |
Incorrect |
0 ms |
5144 KB |
Output isn't correct |
16 |
Incorrect |
9 ms |
5144 KB |
Unexpected end of file - int64 expected |
17 |
Incorrect |
6 ms |
5144 KB |
Unexpected end of file - int64 expected |
18 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
19 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
20 |
Incorrect |
3 ms |
5144 KB |
Unexpected end of file - int64 expected |
21 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
22 |
Incorrect |
23 ms |
5144 KB |
Unexpected end of file - int64 expected |
23 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
24 |
Incorrect |
26 ms |
5144 KB |
Unexpected end of file - int64 expected |
25 |
Incorrect |
69 ms |
5144 KB |
Output isn't correct |
26 |
Incorrect |
23 ms |
5144 KB |
Unexpected end of file - int64 expected |
27 |
Incorrect |
23 ms |
5144 KB |
Unexpected end of file - int64 expected |
28 |
Incorrect |
23 ms |
5144 KB |
Unexpected end of file - int64 expected |
29 |
Incorrect |
29 ms |
5144 KB |
Unexpected end of file - int64 expected |
30 |
Incorrect |
13 ms |
5144 KB |
Unexpected end of file - int64 expected |
31 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
32 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
5144 KB |
Output is correct |
2 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
3 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
4 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
5 |
Partially correct |
0 ms |
5144 KB |
Partially correct |
6 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
7 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
8 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
9 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
10 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
11 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
12 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
13 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
14 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
15 |
Partially correct |
0 ms |
5144 KB |
Partially correct |
16 |
Incorrect |
6 ms |
5144 KB |
Unexpected end of file - int64 expected |
17 |
Incorrect |
6 ms |
5144 KB |
Unexpected end of file - int64 expected |
18 |
Incorrect |
6 ms |
5144 KB |
Unexpected end of file - int64 expected |
19 |
Incorrect |
3 ms |
5144 KB |
Unexpected end of file - int64 expected |
20 |
Incorrect |
3 ms |
5144 KB |
Unexpected end of file - int64 expected |
21 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
22 |
Incorrect |
19 ms |
5144 KB |
Unexpected end of file - int64 expected |
23 |
Incorrect |
19 ms |
5144 KB |
Unexpected end of file - int64 expected |
24 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
25 |
Partially correct |
73 ms |
5144 KB |
Partially correct |
26 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
27 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
28 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |
29 |
Incorrect |
19 ms |
5144 KB |
Unexpected end of file - int64 expected |
30 |
Incorrect |
16 ms |
5144 KB |
Unexpected end of file - int64 expected |
31 |
Incorrect |
0 ms |
5144 KB |
Unexpected end of file - int64 expected |
32 |
Execution timed out |
2000 ms |
5144 KB |
Execution timed out |