# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
83779 |
2018-11-10T14:07:44 Z |
popovicirobert |
Gap (APIO16_gap) |
C++14 |
|
89 ms |
39412 KB |
#include "gap.h"
#define ll long long
#include <bits/stdc++.h>
const ll INF = 1e18;
using namespace std;
long long findGap(int T, int N) {
ll A, B;
MinMax(0, INF, &A, &B);
ll dif = (B - A) / (N - 1);
ll cur = A, ans = dif;
while(cur < B) {
ll s, t, mn, mx;
s = t = cur + 1;
do {
t += dif;
if(t > B) {
break;
}
MinMax(s, t, &mn, &mx);
if(mx == -1) {
continue;
}
else {
break;
}
}while(1);
if(t > B) {
t = min(t, B);
MinMax(t - dif, t, &mn, &mx);
}
ans = max(ans, mn - cur);
cur = mx;
//cerr << cur << " ";
}
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
508 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
668 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
724 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
740 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
748 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
772 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
776 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
820 KB |
Output isn't correct |
9 |
Incorrect |
3 ms |
884 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
888 KB |
Output isn't correct |
11 |
Incorrect |
3 ms |
892 KB |
Output isn't correct |
12 |
Incorrect |
5 ms |
1048 KB |
Output isn't correct |
13 |
Incorrect |
3 ms |
1048 KB |
Output isn't correct |
14 |
Incorrect |
3 ms |
1048 KB |
Output isn't correct |
15 |
Incorrect |
3 ms |
1052 KB |
Output isn't correct |
16 |
Incorrect |
22 ms |
1708 KB |
Output isn't correct |
17 |
Incorrect |
22 ms |
2172 KB |
Output isn't correct |
18 |
Incorrect |
23 ms |
2652 KB |
Output isn't correct |
19 |
Incorrect |
24 ms |
3116 KB |
Output isn't correct |
20 |
Incorrect |
11 ms |
3324 KB |
Output isn't correct |
21 |
Incorrect |
86 ms |
5656 KB |
Output isn't correct |
22 |
Incorrect |
88 ms |
7516 KB |
Output isn't correct |
23 |
Incorrect |
84 ms |
9360 KB |
Output isn't correct |
24 |
Incorrect |
89 ms |
11324 KB |
Output isn't correct |
25 |
Incorrect |
72 ms |
12492 KB |
Output isn't correct |
26 |
Incorrect |
86 ms |
14264 KB |
Output isn't correct |
27 |
Incorrect |
86 ms |
16160 KB |
Output isn't correct |
28 |
Incorrect |
85 ms |
17928 KB |
Output isn't correct |
29 |
Incorrect |
86 ms |
19892 KB |
Output isn't correct |
30 |
Incorrect |
42 ms |
20568 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
20568 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
20568 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
20568 KB |
Output is correct |
2 |
Partially correct |
2 ms |
20568 KB |
Partially correct |
3 |
Partially correct |
2 ms |
20568 KB |
Partially correct |
4 |
Partially correct |
2 ms |
20568 KB |
Partially correct |
5 |
Correct |
2 ms |
20568 KB |
Output is correct |
6 |
Partially correct |
4 ms |
20568 KB |
Partially correct |
7 |
Partially correct |
3 ms |
20568 KB |
Partially correct |
8 |
Partially correct |
2 ms |
20568 KB |
Partially correct |
9 |
Partially correct |
2 ms |
20568 KB |
Partially correct |
10 |
Partially correct |
4 ms |
20568 KB |
Partially correct |
11 |
Partially correct |
3 ms |
20568 KB |
Partially correct |
12 |
Partially correct |
6 ms |
20568 KB |
Partially correct |
13 |
Partially correct |
4 ms |
20568 KB |
Partially correct |
14 |
Partially correct |
3 ms |
20568 KB |
Partially correct |
15 |
Correct |
4 ms |
20568 KB |
Output is correct |
16 |
Partially correct |
21 ms |
20688 KB |
Partially correct |
17 |
Partially correct |
22 ms |
21064 KB |
Partially correct |
18 |
Partially correct |
23 ms |
21528 KB |
Partially correct |
19 |
Partially correct |
22 ms |
22084 KB |
Partially correct |
20 |
Partially correct |
10 ms |
22140 KB |
Partially correct |
21 |
Partially correct |
88 ms |
24660 KB |
Partially correct |
22 |
Partially correct |
84 ms |
26392 KB |
Partially correct |
23 |
Partially correct |
87 ms |
28336 KB |
Partially correct |
24 |
Partially correct |
81 ms |
30112 KB |
Partially correct |
25 |
Correct |
72 ms |
31400 KB |
Output is correct |
26 |
Partially correct |
86 ms |
33172 KB |
Partially correct |
27 |
Partially correct |
87 ms |
35188 KB |
Partially correct |
28 |
Partially correct |
81 ms |
36904 KB |
Partially correct |
29 |
Partially correct |
87 ms |
38720 KB |
Partially correct |
30 |
Partially correct |
41 ms |
39412 KB |
Partially correct |
31 |
Partially correct |
2 ms |
39412 KB |
Partially correct |
32 |
Partially correct |
2 ms |
39412 KB |
Partially correct |