#include "wombats.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 2;
int fen[N], v[N][2];
void upd(int pos, int val){
for(int i = pos; i > 0; i = (i & (i + 1)) - 1)
fen[i] += val;
}
int get(int l){
int ret = 0;
for(int i = l; i < N; i |= i + 1)
ret += fen[i];
return ret;
}
void init(int R, int C, int H[5000][200], int V[5000][200]) {
for(int i = 0; i < R - 1; i ++){
upd(i + 1, V[i][0]);
v[i][0] = V[i][0];
}
}
void changeH(int P, int Q, int W) {
}
void changeV(int P, int Q, int W) {
upd(P + 1, -v[P][Q]);
v[P][Q] = W;
upd(P + 1, W);
}
int escape(int x, int y) {
return get(x + 1);
}
Compilation message
grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
int res;
^~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
4344 KB |
Output is correct |
2 |
Correct |
6 ms |
4344 KB |
Output is correct |
3 |
Correct |
81 ms |
7160 KB |
Output is correct |
4 |
Correct |
6 ms |
4472 KB |
Output is correct |
5 |
Correct |
6 ms |
4344 KB |
Output is correct |
6 |
Correct |
2 ms |
376 KB |
Output is correct |
7 |
Correct |
2 ms |
376 KB |
Output is correct |
8 |
Correct |
2 ms |
376 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
376 KB |
Output is correct |
4 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
4 ms |
504 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
11 ms |
8312 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
4 ms |
504 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
660 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |