# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
81651 |
2018-10-26T00:49:09 Z |
xiaowuc1 |
Gap (APIO16_gap) |
C++14 |
|
41 ms |
1736 KB |
#include <bits/stdc++.h>
#include "gap.h"
using namespace std;
typedef long long ll;
ll onesolve(int n) {
return 0;
}
ll twosolve(int n) {
ll lhs, rhs;
MinMax(1, 1000000000000000000LL, &lhs, &rhs);
ll ret = (rhs-lhs+n-2)/(n-1);
set<ll> all;
all.insert(lhs);
all.insert(rhs);
ll last = lhs+1;
while(last <= rhs) {
MinMax(last, last + ret, &lhs, &rhs);
if(lhs >= 0) {
all.insert(lhs);
all.insert(rhs);
}
last += ret;
}
ll lowest = *all.begin();
for(ll out: all) {
ret = max(ret, out - lowest);
lowest = out;
}
return ret;
}
ll findGap(int t, int n) {
if(t==1) return onesolve(n);
else return twosolve(n);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
372 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
452 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
452 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
468 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
544 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
544 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
560 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
616 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
620 KB |
Output isn't correct |
11 |
Incorrect |
3 ms |
620 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
620 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
620 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
620 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
720 KB |
Output isn't correct |
16 |
Incorrect |
8 ms |
848 KB |
Output isn't correct |
17 |
Incorrect |
9 ms |
848 KB |
Output isn't correct |
18 |
Incorrect |
8 ms |
848 KB |
Output isn't correct |
19 |
Incorrect |
9 ms |
848 KB |
Output isn't correct |
20 |
Incorrect |
5 ms |
848 KB |
Output isn't correct |
21 |
Incorrect |
28 ms |
1388 KB |
Output isn't correct |
22 |
Incorrect |
28 ms |
1388 KB |
Output isn't correct |
23 |
Incorrect |
30 ms |
1388 KB |
Output isn't correct |
24 |
Incorrect |
28 ms |
1388 KB |
Output isn't correct |
25 |
Incorrect |
20 ms |
1516 KB |
Output isn't correct |
26 |
Incorrect |
29 ms |
1592 KB |
Output isn't correct |
27 |
Incorrect |
29 ms |
1592 KB |
Output isn't correct |
28 |
Incorrect |
28 ms |
1592 KB |
Output isn't correct |
29 |
Incorrect |
28 ms |
1592 KB |
Output isn't correct |
30 |
Incorrect |
15 ms |
1592 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
1592 KB |
Output is correct |
2 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
11 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
12 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
13 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
14 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
15 |
Incorrect |
2 ms |
1592 KB |
Output isn't correct |
16 |
Incorrect |
9 ms |
1592 KB |
Output isn't correct |
17 |
Incorrect |
9 ms |
1592 KB |
Output isn't correct |
18 |
Incorrect |
9 ms |
1592 KB |
Output isn't correct |
19 |
Incorrect |
9 ms |
1592 KB |
Output isn't correct |
20 |
Incorrect |
5 ms |
1592 KB |
Output isn't correct |
21 |
Incorrect |
30 ms |
1608 KB |
Output isn't correct |
22 |
Incorrect |
29 ms |
1608 KB |
Output isn't correct |
23 |
Incorrect |
33 ms |
1608 KB |
Output isn't correct |
24 |
Incorrect |
30 ms |
1608 KB |
Output isn't correct |
25 |
Incorrect |
21 ms |
1612 KB |
Output isn't correct |
26 |
Incorrect |
29 ms |
1612 KB |
Output isn't correct |
27 |
Incorrect |
29 ms |
1612 KB |
Output isn't correct |
28 |
Incorrect |
30 ms |
1612 KB |
Output isn't correct |
29 |
Incorrect |
41 ms |
1612 KB |
Output isn't correct |
30 |
Incorrect |
17 ms |
1736 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
1736 KB |
Output isn't correct |
32 |
Incorrect |
3 ms |
1736 KB |
Output isn't correct |