#include "weirdtree.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 300010;
int n, h[maxn];
void initialise(int _n, int, int *_h) {
n = _n, copy(_h + 1, _h + n + 1, h + 1);
}
void cut(int l, int r, int k) {
while (k--) {
int i = max_element(h + l, h + r + 1) - h;
if (!h[i]) break;
h[i]--;
}
}
void magic(int i, int x) {
h[i] = x;
}
ll inspect(int l, int r) {
return accumulate(h + l, h + r + 1, 0LL);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Execution timed out |
2064 ms |
3268 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2079 ms |
340 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2079 ms |
340 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
2007 ms |
5800 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Execution timed out |
2064 ms |
3268 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
340 KB |
Output is correct |
2 |
Correct |
1 ms |
340 KB |
Output is correct |
3 |
Execution timed out |
2064 ms |
3268 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |