# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
24673 |
2017-06-11T06:31:32 Z |
chan492811 |
Gap (APIO16_gap) |
C++11 |
|
93 ms |
4240 KB |
#include "gap.h"
#include <cstdio>
#include <algorithm>
#define ll long long
#define MAX_V (ll)1e18
using namespace std;
ll res;
long long findGap(int t, int n){
int i;
ll l, r, nl, nr, now, tmp;
MinMax(0ll, MAX_V, &l, &r);
if(t == 1){
n -= 2;
while(n > 0){
MinMax(l + 1, r - 1, &nl, &nr);
res = max(res, max(r - nr, nl - l));
l = nl; r = nr;
}
res = max(res, r - l);
MinMax(0ll, MAX_V, &l, &r);
return res;
}
res = now = (r - l + (n - 2)) / (n - 1); nl = l;
for(i = 1; i < n; i++){
MinMax(l + now * (i - 1) + 1, l + now * i, &nr, &tmp);
res = max(res, nr - nl); nl = tmp;
}
return res;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
3 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
4 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
5 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
6 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
7 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
8 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
9 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
10 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
11 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
12 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
13 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
14 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
15 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
16 |
Incorrect |
13 ms |
4240 KB |
Unexpected end of file - int64 expected |
17 |
Incorrect |
13 ms |
4240 KB |
Unexpected end of file - int64 expected |
18 |
Incorrect |
13 ms |
4240 KB |
Unexpected end of file - int64 expected |
19 |
Incorrect |
13 ms |
4240 KB |
Unexpected end of file - int64 expected |
20 |
Incorrect |
6 ms |
4240 KB |
Unexpected end of file - int64 expected |
21 |
Incorrect |
46 ms |
4240 KB |
Unexpected end of file - int64 expected |
22 |
Incorrect |
63 ms |
4240 KB |
Unexpected end of file - int64 expected |
23 |
Incorrect |
43 ms |
4240 KB |
Unexpected end of file - int64 expected |
24 |
Incorrect |
53 ms |
4240 KB |
Unexpected end of file - int64 expected |
25 |
Incorrect |
43 ms |
4240 KB |
Unexpected end of file - int64 expected |
26 |
Incorrect |
59 ms |
4240 KB |
Unexpected end of file - int64 expected |
27 |
Incorrect |
66 ms |
4240 KB |
Unexpected end of file - int64 expected |
28 |
Incorrect |
53 ms |
4240 KB |
Unexpected end of file - int64 expected |
29 |
Incorrect |
63 ms |
4240 KB |
Unexpected end of file - int64 expected |
30 |
Incorrect |
33 ms |
4240 KB |
Unexpected end of file - int64 expected |
31 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
32 |
Incorrect |
0 ms |
4240 KB |
Unexpected end of file - int64 expected |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
4240 KB |
Output is correct |
2 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
5 |
Correct |
0 ms |
4240 KB |
Output is correct |
6 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
11 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
12 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
13 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
14 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
15 |
Correct |
0 ms |
4240 KB |
Output is correct |
16 |
Incorrect |
19 ms |
4240 KB |
Output isn't correct |
17 |
Incorrect |
19 ms |
4240 KB |
Output isn't correct |
18 |
Incorrect |
16 ms |
4240 KB |
Output isn't correct |
19 |
Incorrect |
9 ms |
4240 KB |
Output isn't correct |
20 |
Incorrect |
3 ms |
4240 KB |
Output isn't correct |
21 |
Incorrect |
66 ms |
4240 KB |
Output isn't correct |
22 |
Incorrect |
79 ms |
4240 KB |
Output isn't correct |
23 |
Incorrect |
93 ms |
4240 KB |
Output isn't correct |
24 |
Incorrect |
73 ms |
4240 KB |
Output isn't correct |
25 |
Correct |
73 ms |
4240 KB |
Output is correct |
26 |
Incorrect |
83 ms |
4240 KB |
Output isn't correct |
27 |
Incorrect |
73 ms |
4240 KB |
Output isn't correct |
28 |
Incorrect |
66 ms |
4240 KB |
Output isn't correct |
29 |
Incorrect |
66 ms |
4240 KB |
Output isn't correct |
30 |
Incorrect |
33 ms |
4240 KB |
Output isn't correct |
31 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
4240 KB |
Output isn't correct |