# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
44710 |
2018-04-05T11:29:08 Z |
faustaadp |
Gap (APIO16_gap) |
C++17 |
|
100 ms |
39904 KB |
#include "gap.h"
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;
ll ma,L,R,gm,i,LT,RT;
vector<ll> v;
long long findGap(int T, int N)
{
ma=0;
MinMax(0,(ll)1e18,&L,&R);
gm=(R-L)/(N-1);
for(i=L;i<R;i+=(gm+1))
{
//cout<<i<<" "<<min(i+gm,R)<<"\n";
MinMax(i,min(i+gm,R),<,&RT);
if(LT!=-1)
v.pb(LT);
if(LT!=RT)
v.pb(RT);
}
for(i=1;i<v.size();i++)
ma=max(ma,v[i]-v[i-1]);
return ma;
}
Compilation message
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:25:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=1;i<v.size();i++)
~^~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
632 KB |
Output isn't correct |
2 |
Incorrect |
2 ms |
656 KB |
Output isn't correct |
3 |
Incorrect |
2 ms |
656 KB |
Output isn't correct |
4 |
Incorrect |
2 ms |
656 KB |
Output isn't correct |
5 |
Incorrect |
2 ms |
688 KB |
Output isn't correct |
6 |
Incorrect |
2 ms |
712 KB |
Output isn't correct |
7 |
Incorrect |
2 ms |
716 KB |
Output isn't correct |
8 |
Incorrect |
2 ms |
720 KB |
Output isn't correct |
9 |
Incorrect |
2 ms |
772 KB |
Output isn't correct |
10 |
Incorrect |
2 ms |
888 KB |
Output isn't correct |
11 |
Incorrect |
3 ms |
888 KB |
Output isn't correct |
12 |
Incorrect |
3 ms |
888 KB |
Output isn't correct |
13 |
Incorrect |
3 ms |
980 KB |
Output isn't correct |
14 |
Incorrect |
3 ms |
980 KB |
Output isn't correct |
15 |
Incorrect |
3 ms |
980 KB |
Output isn't correct |
16 |
Incorrect |
21 ms |
1984 KB |
Output isn't correct |
17 |
Incorrect |
23 ms |
2484 KB |
Output isn't correct |
18 |
Incorrect |
21 ms |
2928 KB |
Output isn't correct |
19 |
Incorrect |
21 ms |
3392 KB |
Output isn't correct |
20 |
Incorrect |
14 ms |
3392 KB |
Output isn't correct |
21 |
Incorrect |
83 ms |
6748 KB |
Output isn't correct |
22 |
Incorrect |
74 ms |
8536 KB |
Output isn't correct |
23 |
Incorrect |
100 ms |
10508 KB |
Output isn't correct |
24 |
Incorrect |
82 ms |
12352 KB |
Output isn't correct |
25 |
Incorrect |
68 ms |
13552 KB |
Output isn't correct |
26 |
Incorrect |
78 ms |
15328 KB |
Output isn't correct |
27 |
Incorrect |
75 ms |
17144 KB |
Output isn't correct |
28 |
Incorrect |
75 ms |
19072 KB |
Output isn't correct |
29 |
Incorrect |
77 ms |
20832 KB |
Output isn't correct |
30 |
Incorrect |
39 ms |
20832 KB |
Output isn't correct |
31 |
Incorrect |
2 ms |
20832 KB |
Output isn't correct |
32 |
Incorrect |
2 ms |
20832 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
20832 KB |
Output is correct |
2 |
Correct |
2 ms |
20832 KB |
Output is correct |
3 |
Correct |
2 ms |
20832 KB |
Output is correct |
4 |
Correct |
2 ms |
20832 KB |
Output is correct |
5 |
Correct |
2 ms |
20832 KB |
Output is correct |
6 |
Correct |
2 ms |
20832 KB |
Output is correct |
7 |
Correct |
2 ms |
20832 KB |
Output is correct |
8 |
Correct |
2 ms |
20832 KB |
Output is correct |
9 |
Correct |
2 ms |
20832 KB |
Output is correct |
10 |
Correct |
2 ms |
20832 KB |
Output is correct |
11 |
Correct |
3 ms |
20832 KB |
Output is correct |
12 |
Correct |
3 ms |
20832 KB |
Output is correct |
13 |
Correct |
3 ms |
20832 KB |
Output is correct |
14 |
Correct |
3 ms |
20832 KB |
Output is correct |
15 |
Correct |
3 ms |
20832 KB |
Output is correct |
16 |
Correct |
21 ms |
20948 KB |
Output is correct |
17 |
Correct |
24 ms |
21412 KB |
Output is correct |
18 |
Correct |
19 ms |
21876 KB |
Output is correct |
19 |
Correct |
24 ms |
22356 KB |
Output is correct |
20 |
Correct |
9 ms |
22356 KB |
Output is correct |
21 |
Correct |
77 ms |
25784 KB |
Output is correct |
22 |
Correct |
86 ms |
27628 KB |
Output is correct |
23 |
Correct |
74 ms |
29536 KB |
Output is correct |
24 |
Correct |
88 ms |
31244 KB |
Output is correct |
25 |
Correct |
69 ms |
32464 KB |
Output is correct |
26 |
Correct |
75 ms |
34320 KB |
Output is correct |
27 |
Correct |
74 ms |
36176 KB |
Output is correct |
28 |
Correct |
74 ms |
38024 KB |
Output is correct |
29 |
Correct |
74 ms |
39904 KB |
Output is correct |
30 |
Correct |
39 ms |
39904 KB |
Output is correct |
31 |
Correct |
2 ms |
39904 KB |
Output is correct |
32 |
Correct |
2 ms |
39904 KB |
Output is correct |