# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
489785 |
2021-11-24T15:52:15 Z |
marcoskal |
Gap (APIO16_gap) |
C++14 |
|
2000 ms |
524292 KB |
#include "gap.h"
#include <bits/stdc++.h>
long long findGap(int T, int N)
{
long long first, last, first1, last1;
MinMax(0, 1000000000000000001ll, &first, &last);
long long step=(last-first)/(N-1);
std::vector<long long> v;
v.push_back(first);
long long ans=step, cntr=0;
for(int i=first;i<=last+1;i+=ans)
{
//cout<<i+1<<" "<<i+step<<" "<<endl;
MinMax(i+1, i+ans, &first1, &last1);
if(first1!=-1){
v.push_back(first1);
cntr++;
}
if(last1!=-1&&last1!=first1){
v.push_back(last1);
cntr++;
}
ans=std::max(ans, v[cntr]-v[cntr-1]);
}
//for(int i=0;i<v.size();i++)
//cout<<v[i]<<" ";
//cout<<endl;
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
842 ms |
524288 KB |
Execution killed with signal 9 |
2 |
Runtime error |
1197 ms |
524292 KB |
Execution killed with signal 9 |
3 |
Runtime error |
1142 ms |
524292 KB |
Execution killed with signal 9 |
4 |
Runtime error |
850 ms |
524292 KB |
Execution killed with signal 9 |
5 |
Incorrect |
0 ms |
252 KB |
Output isn't correct |
6 |
Runtime error |
1662 ms |
524292 KB |
Execution killed with signal 9 |
7 |
Runtime error |
1618 ms |
524292 KB |
Execution killed with signal 9 |
8 |
Runtime error |
1033 ms |
524292 KB |
Execution killed with signal 9 |
9 |
Execution timed out |
3083 ms |
263020 KB |
Time limit exceeded |
10 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
11 |
Execution timed out |
2872 ms |
524292 KB |
Time limit exceeded |
12 |
Runtime error |
1572 ms |
524292 KB |
Execution killed with signal 9 |
13 |
Runtime error |
1580 ms |
524292 KB |
Execution killed with signal 9 |
14 |
Execution timed out |
2993 ms |
524292 KB |
Time limit exceeded |
15 |
Execution timed out |
3102 ms |
131716 KB |
Time limit exceeded |
16 |
Execution timed out |
2215 ms |
524292 KB |
Time limit exceeded |
17 |
Execution timed out |
3093 ms |
132088 KB |
Time limit exceeded |
18 |
Execution timed out |
3100 ms |
263188 KB |
Time limit exceeded |
19 |
Execution timed out |
3105 ms |
263268 KB |
Time limit exceeded |
20 |
Incorrect |
6 ms |
456 KB |
Output isn't correct |
21 |
Execution timed out |
3076 ms |
263832 KB |
Time limit exceeded |
22 |
Execution timed out |
3073 ms |
132484 KB |
Time limit exceeded |
23 |
Execution timed out |
3080 ms |
263928 KB |
Time limit exceeded |
24 |
Execution timed out |
3043 ms |
132696 KB |
Time limit exceeded |
25 |
Execution timed out |
3065 ms |
66916 KB |
Time limit exceeded |
26 |
Execution timed out |
3033 ms |
132576 KB |
Time limit exceeded |
27 |
Execution timed out |
3068 ms |
132508 KB |
Time limit exceeded |
28 |
Execution timed out |
3083 ms |
263848 KB |
Time limit exceeded |
29 |
Execution timed out |
3075 ms |
132492 KB |
Time limit exceeded |
30 |
Incorrect |
18 ms |
1096 KB |
Output isn't correct |
31 |
Runtime error |
1307 ms |
524292 KB |
Execution killed with signal 9 |
32 |
Execution timed out |
3109 ms |
263068 KB |
Time limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
820 ms |
524292 KB |
Execution killed with signal 9 |
2 |
Execution timed out |
2117 ms |
524292 KB |
Time limit exceeded |
3 |
Execution timed out |
2255 ms |
524292 KB |
Time limit exceeded |
4 |
Runtime error |
1243 ms |
524292 KB |
Execution killed with signal 9 |
5 |
Correct |
0 ms |
200 KB |
Output is correct |
6 |
Runtime error |
1667 ms |
524292 KB |
Execution killed with signal 9 |
7 |
Runtime error |
1049 ms |
524292 KB |
Execution killed with signal 9 |
8 |
Execution timed out |
3105 ms |
262992 KB |
Time limit exceeded |
9 |
Runtime error |
1679 ms |
524292 KB |
Execution killed with signal 9 |
10 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
11 |
Execution timed out |
3102 ms |
263112 KB |
Time limit exceeded |
12 |
Execution timed out |
2999 ms |
524292 KB |
Time limit exceeded |
13 |
Execution timed out |
2962 ms |
524292 KB |
Time limit exceeded |
14 |
Runtime error |
1672 ms |
524292 KB |
Execution killed with signal 9 |
15 |
Execution timed out |
3085 ms |
132052 KB |
Time limit exceeded |
16 |
Execution timed out |
3098 ms |
131996 KB |
Time limit exceeded |
17 |
Execution timed out |
3080 ms |
131956 KB |
Time limit exceeded |
18 |
Execution timed out |
3094 ms |
131984 KB |
Time limit exceeded |
19 |
Execution timed out |
3093 ms |
131980 KB |
Time limit exceeded |
20 |
Incorrect |
6 ms |
456 KB |
Output isn't correct |
21 |
Execution timed out |
2610 ms |
524292 KB |
Time limit exceeded |
22 |
Execution timed out |
3064 ms |
132468 KB |
Time limit exceeded |
23 |
Execution timed out |
3066 ms |
132596 KB |
Time limit exceeded |
24 |
Execution timed out |
3088 ms |
381872 KB |
Time limit exceeded |
25 |
Execution timed out |
3082 ms |
66912 KB |
Time limit exceeded |
26 |
Execution timed out |
3075 ms |
263848 KB |
Time limit exceeded |
27 |
Execution timed out |
3057 ms |
263860 KB |
Time limit exceeded |
28 |
Execution timed out |
3076 ms |
263992 KB |
Time limit exceeded |
29 |
Execution timed out |
3073 ms |
132548 KB |
Time limit exceeded |
30 |
Incorrect |
19 ms |
1096 KB |
Output isn't correct |
31 |
Runtime error |
1312 ms |
524292 KB |
Execution killed with signal 9 |
32 |
Execution timed out |
3099 ms |
263108 KB |
Time limit exceeded |