# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
568646 |
2022-05-26T00:47:00 Z |
Deepesson |
Gap (APIO16_gap) |
C++17 |
|
2000 ms |
8508 KB |
#include <bits/stdc++.h>
#include "gap.h"
void MinMax(long long, long long, long long*, long long*);
using ll = long long;
long long findGap(int T, int N)
{
if(T==1)
return 0;
else {
std::map<ll,bool> mapa;
ll l=-1,r=1e18+1;
while(l+1<r-1){
ll a,b;
MinMax(l+1,r-1,&a,&b);
if(a!=-1){
mapa[a]=true;
l=a;
}
if(b!=-1){
mapa[b]=true;
r=b;
}
}
ll max=0;
std::vector<ll> vec;
for(auto&x:mapa)vec.push_back(x.first);
for(int i=1;i!=vec.size();++i)max=std::max(max,vec[i]-vec[i-1]);
return max;
}
}
Compilation message
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:30:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
30 | for(int i=1;i!=vec.size();++i)max=std::max(max,vec[i]-vec[i-1]);
| ~^~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
296 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
296 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
208 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
16 |
Incorrect |
5 ms |
464 KB |
Output isn't correct |
17 |
Incorrect |
5 ms |
464 KB |
Output isn't correct |
18 |
Incorrect |
6 ms |
464 KB |
Output isn't correct |
19 |
Incorrect |
4 ms |
464 KB |
Output isn't correct |
20 |
Incorrect |
3 ms |
464 KB |
Output isn't correct |
21 |
Incorrect |
23 ms |
1056 KB |
Output isn't correct |
22 |
Incorrect |
18 ms |
1064 KB |
Output isn't correct |
23 |
Incorrect |
17 ms |
1056 KB |
Output isn't correct |
24 |
Incorrect |
25 ms |
1112 KB |
Output isn't correct |
25 |
Incorrect |
12 ms |
1052 KB |
Output isn't correct |
26 |
Incorrect |
17 ms |
1060 KB |
Output isn't correct |
27 |
Incorrect |
17 ms |
984 KB |
Output isn't correct |
28 |
Incorrect |
17 ms |
1080 KB |
Output isn't correct |
29 |
Incorrect |
18 ms |
1048 KB |
Output isn't correct |
30 |
Incorrect |
10 ms |
1064 KB |
Output isn't correct |
31 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3088 ms |
208 KB |
Time limit exceeded |
2 |
Partially correct |
0 ms |
208 KB |
Partially correct |
3 |
Partially correct |
0 ms |
208 KB |
Partially correct |
4 |
Partially correct |
0 ms |
208 KB |
Partially correct |
5 |
Partially correct |
1 ms |
208 KB |
Partially correct |
6 |
Execution timed out |
3078 ms |
208 KB |
Time limit exceeded |
7 |
Execution timed out |
3076 ms |
208 KB |
Time limit exceeded |
8 |
Execution timed out |
3086 ms |
208 KB |
Time limit exceeded |
9 |
Execution timed out |
3081 ms |
208 KB |
Time limit exceeded |
10 |
Partially correct |
0 ms |
336 KB |
Partially correct |
11 |
Execution timed out |
3075 ms |
336 KB |
Time limit exceeded |
12 |
Execution timed out |
3076 ms |
336 KB |
Time limit exceeded |
13 |
Execution timed out |
3080 ms |
336 KB |
Time limit exceeded |
14 |
Execution timed out |
3078 ms |
336 KB |
Time limit exceeded |
15 |
Execution timed out |
3076 ms |
336 KB |
Time limit exceeded |
16 |
Execution timed out |
3079 ms |
2012 KB |
Time limit exceeded |
17 |
Execution timed out |
3071 ms |
1976 KB |
Time limit exceeded |
18 |
Execution timed out |
3077 ms |
1960 KB |
Time limit exceeded |
19 |
Execution timed out |
3061 ms |
1992 KB |
Time limit exceeded |
20 |
Partially correct |
14 ms |
2384 KB |
Partially correct |
21 |
Execution timed out |
3021 ms |
7324 KB |
Time limit exceeded |
22 |
Execution timed out |
3008 ms |
7336 KB |
Time limit exceeded |
23 |
Execution timed out |
3021 ms |
7340 KB |
Time limit exceeded |
24 |
Execution timed out |
3027 ms |
7244 KB |
Time limit exceeded |
25 |
Execution timed out |
3047 ms |
7316 KB |
Time limit exceeded |
26 |
Execution timed out |
3037 ms |
7244 KB |
Time limit exceeded |
27 |
Execution timed out |
3018 ms |
7276 KB |
Time limit exceeded |
28 |
Execution timed out |
3042 ms |
7272 KB |
Time limit exceeded |
29 |
Execution timed out |
3037 ms |
7316 KB |
Time limit exceeded |
30 |
Incorrect |
61 ms |
8508 KB |
Expected int32, but "2500100000" found |
31 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
32 |
Partially correct |
0 ms |
208 KB |
Partially correct |