# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
23278 |
2017-05-05T22:12:20 Z |
repeating |
Gap (APIO16_gap) |
C++11 |
|
163 ms |
524288 KB |
#include <bits/stdc++.h>
#define F first
#define S second
#define P push
#define pb push_back
#define MEM(dp,i) memset(dp,i,sizeof(dp))
#define W while
#define R return
#define C continue
#define SI size()
#define ll long long
#define pll pair<ll,ll>
#define SF(x) scanf("%I64d",&x)
using namespace std;
const long long INF = 2e9;
long long MOD = 1e9+7;
void MinMax(ll ,ll ,long long &,long long &);
void MinMax(ll s,ll t,long long &mn,long long &mx){
// cout<<s<<" "<<t<<endl;
// cin>>mn>>mx;
}
long long findGap(int,int);
long long findGap(int t,int n){
ll l=0,r=1e18;
vector<ll> v;
W(l+1<r){
MinMax(l+1,r-1,l,r);
v.pb(l);
v.pb(r);
if(l==-1)break;
}
sort(v.begin(),v.end());
ll res=0;
for(int i=1;i<v.SI;i++){
res=max(res,v[i]-v[i-1]);
}
R res;
}
//int main(){
// cout<<findGap(1,4);
//}
Compilation message
gap.cpp: In function 'long long int findGap(int, int)':
gap.cpp:35:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=1;i<v.SI;i++){
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Memory limit exceeded |
133 ms |
524288 KB |
Memory limit exceeded |
2 |
Memory limit exceeded |
106 ms |
524288 KB |
Memory limit exceeded |
3 |
Memory limit exceeded |
96 ms |
524288 KB |
Memory limit exceeded |
4 |
Memory limit exceeded |
96 ms |
524288 KB |
Memory limit exceeded |
5 |
Memory limit exceeded |
119 ms |
524288 KB |
Memory limit exceeded |
6 |
Memory limit exceeded |
89 ms |
524288 KB |
Memory limit exceeded |
7 |
Memory limit exceeded |
123 ms |
524288 KB |
Memory limit exceeded |
8 |
Memory limit exceeded |
119 ms |
524288 KB |
Memory limit exceeded |
9 |
Memory limit exceeded |
149 ms |
524288 KB |
Memory limit exceeded |
10 |
Memory limit exceeded |
146 ms |
524288 KB |
Memory limit exceeded |
11 |
Memory limit exceeded |
83 ms |
524288 KB |
Memory limit exceeded |
12 |
Memory limit exceeded |
53 ms |
524288 KB |
Memory limit exceeded |
13 |
Memory limit exceeded |
96 ms |
524288 KB |
Memory limit exceeded |
14 |
Memory limit exceeded |
126 ms |
524288 KB |
Memory limit exceeded |
15 |
Memory limit exceeded |
106 ms |
524288 KB |
Memory limit exceeded |
16 |
Memory limit exceeded |
103 ms |
524288 KB |
Memory limit exceeded |
17 |
Memory limit exceeded |
106 ms |
524288 KB |
Memory limit exceeded |
18 |
Memory limit exceeded |
113 ms |
524288 KB |
Memory limit exceeded |
19 |
Memory limit exceeded |
129 ms |
524288 KB |
Memory limit exceeded |
20 |
Memory limit exceeded |
99 ms |
524288 KB |
Memory limit exceeded |
21 |
Memory limit exceeded |
139 ms |
524288 KB |
Memory limit exceeded |
22 |
Memory limit exceeded |
136 ms |
524288 KB |
Memory limit exceeded |
23 |
Memory limit exceeded |
143 ms |
524288 KB |
Memory limit exceeded |
24 |
Memory limit exceeded |
153 ms |
524288 KB |
Memory limit exceeded |
25 |
Memory limit exceeded |
139 ms |
524288 KB |
Memory limit exceeded |
26 |
Memory limit exceeded |
153 ms |
524288 KB |
Memory limit exceeded |
27 |
Memory limit exceeded |
123 ms |
524288 KB |
Memory limit exceeded |
28 |
Memory limit exceeded |
126 ms |
524288 KB |
Memory limit exceeded |
29 |
Memory limit exceeded |
126 ms |
524288 KB |
Memory limit exceeded |
30 |
Memory limit exceeded |
146 ms |
524288 KB |
Memory limit exceeded |
31 |
Memory limit exceeded |
93 ms |
524288 KB |
Memory limit exceeded |
32 |
Memory limit exceeded |
123 ms |
524288 KB |
Memory limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Memory limit exceeded |
109 ms |
524288 KB |
Memory limit exceeded |
2 |
Memory limit exceeded |
103 ms |
524288 KB |
Memory limit exceeded |
3 |
Memory limit exceeded |
96 ms |
524288 KB |
Memory limit exceeded |
4 |
Memory limit exceeded |
133 ms |
524288 KB |
Memory limit exceeded |
5 |
Memory limit exceeded |
96 ms |
524288 KB |
Memory limit exceeded |
6 |
Memory limit exceeded |
93 ms |
524288 KB |
Memory limit exceeded |
7 |
Memory limit exceeded |
96 ms |
524288 KB |
Memory limit exceeded |
8 |
Memory limit exceeded |
129 ms |
524288 KB |
Memory limit exceeded |
9 |
Memory limit exceeded |
106 ms |
524288 KB |
Memory limit exceeded |
10 |
Memory limit exceeded |
116 ms |
524288 KB |
Memory limit exceeded |
11 |
Memory limit exceeded |
106 ms |
524288 KB |
Memory limit exceeded |
12 |
Memory limit exceeded |
109 ms |
524288 KB |
Memory limit exceeded |
13 |
Memory limit exceeded |
119 ms |
524288 KB |
Memory limit exceeded |
14 |
Memory limit exceeded |
106 ms |
524288 KB |
Memory limit exceeded |
15 |
Memory limit exceeded |
113 ms |
524288 KB |
Memory limit exceeded |
16 |
Memory limit exceeded |
109 ms |
524288 KB |
Memory limit exceeded |
17 |
Memory limit exceeded |
129 ms |
524288 KB |
Memory limit exceeded |
18 |
Memory limit exceeded |
109 ms |
524288 KB |
Memory limit exceeded |
19 |
Memory limit exceeded |
119 ms |
524288 KB |
Memory limit exceeded |
20 |
Memory limit exceeded |
93 ms |
524288 KB |
Memory limit exceeded |
21 |
Memory limit exceeded |
103 ms |
524288 KB |
Memory limit exceeded |
22 |
Memory limit exceeded |
146 ms |
524288 KB |
Memory limit exceeded |
23 |
Memory limit exceeded |
149 ms |
524288 KB |
Memory limit exceeded |
24 |
Memory limit exceeded |
153 ms |
524288 KB |
Memory limit exceeded |
25 |
Memory limit exceeded |
133 ms |
524288 KB |
Memory limit exceeded |
26 |
Memory limit exceeded |
163 ms |
524288 KB |
Memory limit exceeded |
27 |
Memory limit exceeded |
143 ms |
524288 KB |
Memory limit exceeded |
28 |
Memory limit exceeded |
156 ms |
524288 KB |
Memory limit exceeded |
29 |
Memory limit exceeded |
126 ms |
524288 KB |
Memory limit exceeded |
30 |
Memory limit exceeded |
116 ms |
524288 KB |
Memory limit exceeded |
31 |
Memory limit exceeded |
106 ms |
524288 KB |
Memory limit exceeded |
32 |
Memory limit exceeded |
113 ms |
524288 KB |
Memory limit exceeded |