# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
673200 |
2022-12-19T22:19:45 Z |
beedle |
Gap (APIO16_gap) |
C++17 |
|
56 ms |
3060 KB |
#include "gap.h"
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <set>
#include <iterator>
#include <stack>
#include <map>
#include <math.h>
#include <bitset>
#include <deque>
#include <string>
#include <tuple>
#include <queue>
#include <numeric>
#include <complex>
#include <assert.h>
#include <unordered_set>
#include <unordered_map>
using namespace std;
#define ll long long
#define rep(i, a, b) for (long long i = a; i <= b; i++)
#define sz(x) (ll) (x).size ()
long long findGap(int T, int N)
{
ll lo=0;
ll hi=1e18;
vector <ll> f,r;
ll cnt=0;
while(cnt<N)
{
ll mn,mx;
MinMax(lo,hi,&mn,&mx);
if(cnt+1==N)
{
f.push_back(mn);
cnt+=1;
}
else
{
f.push_back(mn);
r.push_back(mx);
cnt+=2;
}
}
vector <ll> v;
for(auto x:f)
v.push_back(x);
reverse(r.begin(),r.end());
for(auto x:r)
v.push_back(x);
ll ans=0;
rep(i,0,sz(v)-2)
ans=max(ans,v[i+1]-v[i]);
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
208 KB |
Output is correct |
2 |
Incorrect |
1 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 |
208 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 |
2 ms |
336 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
16 |
Incorrect |
7 ms |
1128 KB |
Output isn't correct |
17 |
Incorrect |
6 ms |
1104 KB |
Output isn't correct |
18 |
Incorrect |
7 ms |
1096 KB |
Output isn't correct |
19 |
Incorrect |
7 ms |
1168 KB |
Output isn't correct |
20 |
Incorrect |
6 ms |
1136 KB |
Output isn't correct |
21 |
Incorrect |
53 ms |
3052 KB |
Output isn't correct |
22 |
Incorrect |
26 ms |
3060 KB |
Output isn't correct |
23 |
Incorrect |
31 ms |
3012 KB |
Output isn't correct |
24 |
Incorrect |
48 ms |
2984 KB |
Output isn't correct |
25 |
Incorrect |
23 ms |
2988 KB |
Output isn't correct |
26 |
Incorrect |
26 ms |
2936 KB |
Output isn't correct |
27 |
Incorrect |
36 ms |
2968 KB |
Output isn't correct |
28 |
Incorrect |
27 ms |
3004 KB |
Output isn't correct |
29 |
Incorrect |
26 ms |
2984 KB |
Output isn't correct |
30 |
Incorrect |
18 ms |
3012 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 |
Correct |
0 ms |
208 KB |
Output is 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 |
1 ms |
208 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 |
336 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
16 |
Incorrect |
6 ms |
1168 KB |
Output isn't correct |
17 |
Incorrect |
7 ms |
1136 KB |
Output isn't correct |
18 |
Incorrect |
6 ms |
1104 KB |
Output isn't correct |
19 |
Incorrect |
8 ms |
1128 KB |
Output isn't correct |
20 |
Incorrect |
4 ms |
1132 KB |
Output isn't correct |
21 |
Incorrect |
26 ms |
3016 KB |
Expected int32, but "5000050000" found |
22 |
Incorrect |
28 ms |
3012 KB |
Expected int32, but "5000050000" found |
23 |
Incorrect |
56 ms |
2924 KB |
Expected int32, but "5000050000" found |
24 |
Incorrect |
26 ms |
3020 KB |
Expected int32, but "5000050000" found |
25 |
Incorrect |
22 ms |
2976 KB |
Expected int32, but "5000050000" found |
26 |
Incorrect |
30 ms |
2964 KB |
Expected int32, but "5000050000" found |
27 |
Incorrect |
28 ms |
2956 KB |
Expected int32, but "5000050000" found |
28 |
Incorrect |
30 ms |
2968 KB |
Expected int32, but "5000050000" found |
29 |
Incorrect |
25 ms |
3000 KB |
Expected int32, but "5000050000" found |
30 |
Incorrect |
18 ms |
3020 KB |
Expected int32, but "5000050000" found |
31 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
208 KB |
Output isn't correct |