# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
441703 |
2021-07-05T21:00:17 Z |
julian33 |
Gap (APIO16_gap) |
C++14 |
|
39 ms |
2240 KB |
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define deb(...) logger(#__VA_ARGS__, __VA_ARGS__)
template<typename ...Args>
void logger(string vars, Args&&... values) {
cerr<<vars<<" = ";
string delim="";
(...,(cerr<<delim<<values,delim=", "));
cerr<<"\n";
}
#else
#define deb(...) logger(#__VA_ARGS__, __VA_ARGS__)
template<typename ...Args>
void logger(string vars, Args&&... values) {}
#endif
#define FOR(i,j,n) for(int i=j;i<n;i++)
#define pb push_back
#define sz(x) (int)(x.size())
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
template<typename T> inline void maxa(T& a,T b){a=max(a,b);}
template<typename T> inline void mina(T& a,T b){a=min(a,b);}
vector<ll> A;
void MinMax(ll s,ll t,ll &mn, ll &mx){
// mn=*lower_bound(A.begin(),A.end(),s);
// mx=*--lower_bound(A.begin(),A.end(),t+1);
}
ll findGap(int t, int n){
assert(t==1);
ll mn=0; ll mx=1e18;
vector<ll> ans;
for(int i=0;i<=n/2 && mn!=mx;i++){
MinMax(mn,mx,mn,mx);
ans.pb(mn); ans.pb(mx);
mn++; mx++;
}
while(sz(ans)<n)
ans.pb(mn);
sort(ans.begin(),ans.end());
ll best=0;
for(int i=1;i<n;i++){
maxa(best,ans[i]-ans[i-1]);
}
return best;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
2 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
3 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
4 |
Incorrect |
1 ms |
200 KB |
Output isn't correct |
5 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
6 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
7 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
8 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
9 |
Incorrect |
1 ms |
200 KB |
Output isn't correct |
10 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
11 |
Incorrect |
1 ms |
328 KB |
Output isn't correct |
12 |
Incorrect |
1 ms |
328 KB |
Output isn't correct |
13 |
Incorrect |
1 ms |
328 KB |
Output isn't correct |
14 |
Incorrect |
1 ms |
328 KB |
Output isn't correct |
15 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
16 |
Incorrect |
8 ms |
896 KB |
Output isn't correct |
17 |
Incorrect |
7 ms |
804 KB |
Output isn't correct |
18 |
Incorrect |
8 ms |
840 KB |
Output isn't correct |
19 |
Incorrect |
8 ms |
868 KB |
Output isn't correct |
20 |
Incorrect |
5 ms |
816 KB |
Output isn't correct |
21 |
Incorrect |
29 ms |
2220 KB |
Output isn't correct |
22 |
Incorrect |
29 ms |
2236 KB |
Output isn't correct |
23 |
Incorrect |
29 ms |
2228 KB |
Output isn't correct |
24 |
Incorrect |
28 ms |
2232 KB |
Output isn't correct |
25 |
Incorrect |
26 ms |
2184 KB |
Output isn't correct |
26 |
Incorrect |
39 ms |
2192 KB |
Output isn't correct |
27 |
Incorrect |
28 ms |
2232 KB |
Output isn't correct |
28 |
Incorrect |
32 ms |
2192 KB |
Output isn't correct |
29 |
Incorrect |
31 ms |
2176 KB |
Output isn't correct |
30 |
Incorrect |
20 ms |
2240 KB |
Output isn't correct |
31 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
32 |
Incorrect |
0 ms |
200 KB |
Output isn't correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
2 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
3 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
4 |
Runtime error |
1 ms |
452 KB |
Execution killed with signal 6 |
5 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
6 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
7 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
8 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
9 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
10 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
11 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
12 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
13 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
14 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
15 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
16 |
Runtime error |
8 ms |
804 KB |
Execution killed with signal 6 |
17 |
Runtime error |
7 ms |
840 KB |
Execution killed with signal 6 |
18 |
Runtime error |
7 ms |
840 KB |
Execution killed with signal 6 |
19 |
Runtime error |
6 ms |
840 KB |
Execution killed with signal 6 |
20 |
Runtime error |
4 ms |
848 KB |
Execution killed with signal 6 |
21 |
Runtime error |
23 ms |
1948 KB |
Execution killed with signal 6 |
22 |
Runtime error |
23 ms |
1984 KB |
Execution killed with signal 6 |
23 |
Runtime error |
30 ms |
1988 KB |
Execution killed with signal 6 |
24 |
Runtime error |
23 ms |
1984 KB |
Execution killed with signal 6 |
25 |
Runtime error |
18 ms |
1984 KB |
Execution killed with signal 6 |
26 |
Runtime error |
27 ms |
1944 KB |
Execution killed with signal 6 |
27 |
Runtime error |
32 ms |
1952 KB |
Execution killed with signal 6 |
28 |
Runtime error |
22 ms |
1984 KB |
Execution killed with signal 6 |
29 |
Runtime error |
32 ms |
1948 KB |
Execution killed with signal 6 |
30 |
Runtime error |
14 ms |
1992 KB |
Execution killed with signal 6 |
31 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |
32 |
Runtime error |
1 ms |
456 KB |
Execution killed with signal 6 |