# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
38741 |
2018-01-06T11:27:03 Z |
oTTo_22 |
Gap (APIO16_gap) |
C++14 |
|
2000 ms |
524288 KB |
#include <bits/stdc++.h>
#include "gap.h"
#define se second
#define fi first
using namespace std;
long long ans;
void func (long long L,long long R) {
long long mi1,ma1,mi2,ma2;
long long mid=(L+R)/2;
MinMax(L,mid,&mi1,&ma1);
MinMax(mid,R,&mi2,&ma2);
if (mi1==-1 && mi2==-1) {
ans=max(ans,R-L);
return ;
}
if (mi1==-1) {
ans=max(ans,mi2-L);
return;
}
if (mi2==-1) {
ans=max(ans,R-ma1);
return;
}
func(L,ma1);
func(mi2,R);
}
long long findGap(int T, int N)
{
long long Mn,Mx;
long long S=0;
long long TT=1000000000000000000;
MinMax(S,TT,&Mn,&Mx);
ans=0;
func (Mn,Mx);
return ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Memory limit exceeded |
269 ms |
524288 KB |
Memory limit exceeded |
2 |
Memory limit exceeded |
649 ms |
524288 KB |
Memory limit exceeded |
3 |
Memory limit exceeded |
663 ms |
524288 KB |
Memory limit exceeded |
4 |
Memory limit exceeded |
646 ms |
524288 KB |
Memory limit exceeded |
5 |
Memory limit exceeded |
679 ms |
524288 KB |
Memory limit exceeded |
6 |
Memory limit exceeded |
959 ms |
524288 KB |
Memory limit exceeded |
7 |
Memory limit exceeded |
976 ms |
524288 KB |
Memory limit exceeded |
8 |
Memory limit exceeded |
1139 ms |
524288 KB |
Memory limit exceeded |
9 |
Memory limit exceeded |
976 ms |
524288 KB |
Memory limit exceeded |
10 |
Memory limit exceeded |
913 ms |
524288 KB |
Memory limit exceeded |
11 |
Memory limit exceeded |
1506 ms |
524288 KB |
Memory limit exceeded |
12 |
Memory limit exceeded |
1549 ms |
524288 KB |
Memory limit exceeded |
13 |
Memory limit exceeded |
1479 ms |
524288 KB |
Memory limit exceeded |
14 |
Memory limit exceeded |
1563 ms |
524288 KB |
Memory limit exceeded |
15 |
Memory limit exceeded |
1599 ms |
524288 KB |
Memory limit exceeded |
16 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
17 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
18 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
19 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
20 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
21 |
Execution timed out |
2000 ms |
513600 KB |
Execution timed out |
22 |
Execution timed out |
2000 ms |
518244 KB |
Execution timed out |
23 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
24 |
Execution timed out |
2000 ms |
523688 KB |
Execution timed out |
25 |
Execution timed out |
2000 ms |
518244 KB |
Execution timed out |
26 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
27 |
Execution timed out |
2000 ms |
487188 KB |
Execution timed out |
28 |
Execution timed out |
2000 ms |
505604 KB |
Execution timed out |
29 |
Execution timed out |
2000 ms |
517656 KB |
Execution timed out |
30 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
31 |
Memory limit exceeded |
1006 ms |
524288 KB |
Memory limit exceeded |
32 |
Memory limit exceeded |
959 ms |
524288 KB |
Memory limit exceeded |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Memory limit exceeded |
396 ms |
524288 KB |
Memory limit exceeded |
2 |
Memory limit exceeded |
663 ms |
524288 KB |
Memory limit exceeded |
3 |
Memory limit exceeded |
569 ms |
524288 KB |
Memory limit exceeded |
4 |
Memory limit exceeded |
633 ms |
524288 KB |
Memory limit exceeded |
5 |
Memory limit exceeded |
596 ms |
524288 KB |
Memory limit exceeded |
6 |
Memory limit exceeded |
1093 ms |
524288 KB |
Memory limit exceeded |
7 |
Memory limit exceeded |
926 ms |
524288 KB |
Memory limit exceeded |
8 |
Memory limit exceeded |
916 ms |
524288 KB |
Memory limit exceeded |
9 |
Memory limit exceeded |
986 ms |
524288 KB |
Memory limit exceeded |
10 |
Memory limit exceeded |
979 ms |
524288 KB |
Memory limit exceeded |
11 |
Memory limit exceeded |
1483 ms |
524288 KB |
Memory limit exceeded |
12 |
Memory limit exceeded |
1506 ms |
524288 KB |
Memory limit exceeded |
13 |
Memory limit exceeded |
1609 ms |
524288 KB |
Memory limit exceeded |
14 |
Memory limit exceeded |
1636 ms |
524288 KB |
Memory limit exceeded |
15 |
Memory limit exceeded |
1529 ms |
524288 KB |
Memory limit exceeded |
16 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
17 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
18 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
19 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
20 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
21 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
22 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
23 |
Execution timed out |
2000 ms |
522208 KB |
Execution timed out |
24 |
Execution timed out |
2000 ms |
496116 KB |
Execution timed out |
25 |
Execution timed out |
2000 ms |
524288 KB |
Execution timed out |
26 |
Execution timed out |
2000 ms |
500316 KB |
Execution timed out |
27 |
Execution timed out |
2000 ms |
500960 KB |
Execution timed out |
28 |
Execution timed out |
2000 ms |
517144 KB |
Execution timed out |
29 |
Execution timed out |
2000 ms |
521084 KB |
Execution timed out |
30 |
Execution timed out |
2000 ms |
507444 KB |
Execution timed out |
31 |
Memory limit exceeded |
1043 ms |
524288 KB |
Memory limit exceeded |
32 |
Memory limit exceeded |
999 ms |
524288 KB |
Memory limit exceeded |