# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
882374 |
2023-12-03T05:49:54 Z |
dubabuba |
Gap (APIO16_gap) |
C++14 |
|
19 ms |
5584 KB |
#include "gap.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define ff first
#define ss second
struct node {
node *LC, *RC;
ll tl, tr;
ll mn, mx;
ll ans;
node(ll l, ll r) {
ans = -1;
tl = l, tr = r;
MinMax(l, r, &mn, &mx);
}
bool birth() {
if(tl == tr) return 0;
if(mn == mx) return 0;
LC = new node(tl, (tl + tr) / 2);
RC = new node((tl + tr) / 2 + 1, tr);
return 1;
}
ll merge(node *L, node *R) {
ll ret = max(L-> ans, R-> ans);
// if(L-> mx == -1) return ret;
// if(R-> mn == -1) return ret;
ret = max(ret, R-> mn - L-> mx);
return ret;
}
void build() {
if(tl == tr) return;
if(mn == mx) return;
LC-> build();
RC-> build();
ans = merge(LC, RC);
}
};
ll findGap(int T, int N) {
node *root = new node(1LL, N);
assert(root-> ans != -1);
return root-> ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 6 |
2 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
3 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
4 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
5 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
6 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
7 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
8 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
9 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
10 |
Runtime error |
2 ms |
4520 KB |
Execution killed with signal 6 |
11 |
Runtime error |
3 ms |
4696 KB |
Execution killed with signal 6 |
12 |
Runtime error |
2 ms |
4564 KB |
Execution killed with signal 6 |
13 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
14 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
15 |
Runtime error |
2 ms |
4736 KB |
Execution killed with signal 6 |
16 |
Runtime error |
7 ms |
4884 KB |
Execution killed with signal 6 |
17 |
Runtime error |
5 ms |
4892 KB |
Execution killed with signal 6 |
18 |
Runtime error |
5 ms |
5056 KB |
Execution killed with signal 6 |
19 |
Runtime error |
6 ms |
4884 KB |
Execution killed with signal 6 |
20 |
Runtime error |
4 ms |
4944 KB |
Execution killed with signal 6 |
21 |
Runtime error |
14 ms |
5416 KB |
Execution killed with signal 6 |
22 |
Runtime error |
14 ms |
5344 KB |
Execution killed with signal 6 |
23 |
Runtime error |
15 ms |
5408 KB |
Execution killed with signal 6 |
24 |
Runtime error |
14 ms |
5584 KB |
Execution killed with signal 6 |
25 |
Runtime error |
11 ms |
5408 KB |
Execution killed with signal 6 |
26 |
Runtime error |
19 ms |
5388 KB |
Execution killed with signal 6 |
27 |
Runtime error |
14 ms |
5416 KB |
Execution killed with signal 6 |
28 |
Runtime error |
15 ms |
5416 KB |
Execution killed with signal 6 |
29 |
Runtime error |
14 ms |
5416 KB |
Execution killed with signal 6 |
30 |
Runtime error |
10 ms |
5484 KB |
Execution killed with signal 6 |
31 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
32 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
2 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
3 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
4 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
5 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
6 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
7 |
Runtime error |
2 ms |
4692 KB |
Execution killed with signal 6 |
8 |
Runtime error |
3 ms |
4696 KB |
Execution killed with signal 6 |
9 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
10 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
11 |
Runtime error |
3 ms |
4852 KB |
Execution killed with signal 6 |
12 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
13 |
Runtime error |
3 ms |
4696 KB |
Execution killed with signal 6 |
14 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
15 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
16 |
Runtime error |
5 ms |
4892 KB |
Execution killed with signal 6 |
17 |
Runtime error |
5 ms |
4884 KB |
Execution killed with signal 6 |
18 |
Runtime error |
5 ms |
5056 KB |
Execution killed with signal 6 |
19 |
Runtime error |
5 ms |
4884 KB |
Execution killed with signal 6 |
20 |
Runtime error |
4 ms |
4880 KB |
Execution killed with signal 6 |
21 |
Runtime error |
14 ms |
5416 KB |
Execution killed with signal 6 |
22 |
Runtime error |
15 ms |
5412 KB |
Execution killed with signal 6 |
23 |
Runtime error |
15 ms |
5320 KB |
Execution killed with signal 6 |
24 |
Runtime error |
14 ms |
5416 KB |
Execution killed with signal 6 |
25 |
Runtime error |
13 ms |
5416 KB |
Execution killed with signal 6 |
26 |
Runtime error |
15 ms |
5416 KB |
Execution killed with signal 6 |
27 |
Runtime error |
14 ms |
5584 KB |
Execution killed with signal 6 |
28 |
Runtime error |
14 ms |
5416 KB |
Execution killed with signal 6 |
29 |
Runtime error |
14 ms |
5404 KB |
Execution killed with signal 6 |
30 |
Runtime error |
9 ms |
5408 KB |
Execution killed with signal 6 |
31 |
Runtime error |
2 ms |
4696 KB |
Execution killed with signal 6 |
32 |
Runtime error |
3 ms |
4696 KB |
Execution killed with signal 6 |