# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
22006 |
2017-04-28T19:42:33 Z |
Hiasat |
Gap (APIO16_gap) |
C++14 |
|
99 ms |
8308 KB |
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> v;
long long findGap(int T, int N) {
ll mx = 0;
if(T == 2){
ll cur = 1;
ll lo,hi;
MinMax(1, 1e18, &lo, &hi);
v.push_back(lo);
v.push_back(hi);
ll big = hi;
ll sure = (hi-lo)/N;
while(cur < big){
MinMax(cur, cur+sure, &lo, &hi);
if(lo == -1){
cur = cur + sure;
continue;
}
v.push_back(lo);
v.push_back(hi);
cur = hi + 1;
}
sort(v.begin(),v.end());
for (int i = 0; i + 1 < v.size(); ++i){
mx = max(mx,abs(v[i]-v[i+1]));
}
}
return mx;
}
Compilation message
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:32:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i + 1 < v.size(); ++i){
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
4 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
9 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
11 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
12 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
13 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
14 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
15 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
16 |
Incorrect |
6 ms |
5148 KB |
Output isn't correct |
17 |
Incorrect |
6 ms |
5148 KB |
Output isn't correct |
18 |
Incorrect |
6 ms |
5148 KB |
Output isn't correct |
19 |
Incorrect |
6 ms |
5148 KB |
Output isn't correct |
20 |
Incorrect |
3 ms |
5148 KB |
Output isn't correct |
21 |
Incorrect |
23 ms |
5148 KB |
Output isn't correct |
22 |
Incorrect |
36 ms |
5148 KB |
Output isn't correct |
23 |
Incorrect |
23 ms |
5148 KB |
Output isn't correct |
24 |
Incorrect |
26 ms |
5148 KB |
Output isn't correct |
25 |
Incorrect |
23 ms |
5148 KB |
Output isn't correct |
26 |
Incorrect |
19 ms |
5148 KB |
Output isn't correct |
27 |
Incorrect |
26 ms |
5148 KB |
Output isn't correct |
28 |
Incorrect |
23 ms |
5148 KB |
Output isn't correct |
29 |
Incorrect |
19 ms |
5148 KB |
Output isn't correct |
30 |
Incorrect |
13 ms |
5148 KB |
Output isn't correct |
31 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
5148 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
2 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
3 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
4 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
5 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
6 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
7 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
8 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
9 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
10 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
11 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
12 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
13 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
14 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
15 |
Partially correct |
0 ms |
5292 KB |
Partially correct |
16 |
Partially correct |
19 ms |
6004 KB |
Partially correct |
17 |
Partially correct |
19 ms |
6004 KB |
Partially correct |
18 |
Partially correct |
16 ms |
6004 KB |
Partially correct |
19 |
Partially correct |
19 ms |
6004 KB |
Partially correct |
20 |
Partially correct |
6 ms |
5148 KB |
Partially correct |
21 |
Partially correct |
86 ms |
8308 KB |
Partially correct |
22 |
Partially correct |
76 ms |
8308 KB |
Partially correct |
23 |
Partially correct |
79 ms |
8308 KB |
Partially correct |
24 |
Partially correct |
76 ms |
8308 KB |
Partially correct |
25 |
Partially correct |
99 ms |
8308 KB |
Partially correct |
26 |
Partially correct |
86 ms |
8308 KB |
Partially correct |
27 |
Partially correct |
96 ms |
8308 KB |
Partially correct |
28 |
Partially correct |
83 ms |
8308 KB |
Partially correct |
29 |
Partially correct |
86 ms |
8308 KB |
Partially correct |
30 |
Partially correct |
39 ms |
5620 KB |
Partially correct |
31 |
Partially correct |
0 ms |
5148 KB |
Partially correct |
32 |
Partially correct |
0 ms |
5148 KB |
Partially correct |