#include "wombats.h"
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> v2i;
typedef pair<int, int> pi;
#define pb push_back
#define mp make_pair
#define rept(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
//sub1
v2i h, v;
int r, c;
int totw = 0;
void init(int R, int C, int H[5000][200], int V[5000][200]) {
vi tmp;
if (C != 1) exit(1);
rep(i, R) {
tmp.clear();
rep(j, C - 1) {
tmp.pb(H[i][j]);
}
h.pb(tmp);
}
rep(i, R-1) {
tmp.clear();
rep(j, C) {
tmp.pb(V[i][j]);
totw += V[i][j];
}
v.pb(tmp);
}
}
void changeH(int P, int Q, int W) {
h[P][Q] = W;
}
void changeV(int P, int Q, int W) {
totw += W - v[P][Q];
v[P][Q] = W;
}
int escape(int V1, int V2) {
return totw;
}
Compilation message
grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
15 | int res;
| ^~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
4636 KB |
Output is correct |
2 |
Correct |
2 ms |
4740 KB |
Output is correct |
3 |
Correct |
41 ms |
7612 KB |
Output is correct |
4 |
Correct |
2 ms |
4632 KB |
Output is correct |
5 |
Correct |
2 ms |
4636 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Runtime error |
0 ms |
348 KB |
Execution failed because the return code was nonzero |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
604 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
4 ms |
8284 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
604 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
2 ms |
604 KB |
Execution failed because the return code was nonzero |
2 |
Halted |
0 ms |
0 KB |
- |