#include "vision.h"
using namespace std;
#define pb push_back
void construct_network(int H, int W, int K) {
vector<int> v;
int k = H*W;
for (int i = 0; i < H; ++i) {
for (int j = 0; j < W; ++j) {
int cur = i * W + j;
vector<int> arr;
arr.pb(cur);
for (int l = 0; l < K; ++l) {
int to = (i + l) * W + j + (K - l);
if (to >= 0 && to < H*W){
arr.pb(to);
add_and(arr);
arr.pop_back();
v.pb(k++);
}
to = (i + l) * W + j - (K - l);
if (to >= 0 && to < H*W){
arr.pb(to);
add_and(arr);
arr.pop_back();
v.pb(k++);
}
to = (i - l) * W + j + (K - l);
if (to >= 0 && to < H*W){
arr.pb(to);
add_and(arr);
arr.pop_back();
v.pb(k++);
}
to = (i - l) * W + j - (K - l);
if (to >= 0 && to < H*W){
arr.pb(to);
add_and(arr);
arr.pop_back();
v.pb(k++);
}
}
}
}
add_or(v);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
280 KB |
Output is correct |
4 |
Incorrect |
1 ms |
284 KB |
on inputs (0, 0), (1, 0), expected 0, but computed 1 |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
280 KB |
Output is correct |
4 |
Incorrect |
1 ms |
284 KB |
on inputs (0, 0), (1, 0), expected 0, but computed 1 |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
280 KB |
Output is correct |
4 |
Incorrect |
1 ms |
284 KB |
on inputs (0, 0), (1, 0), expected 0, but computed 1 |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
280 KB |
Output is correct |
4 |
Incorrect |
1 ms |
284 KB |
on inputs (0, 0), (1, 0), expected 0, but computed 1 |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
280 KB |
Output is correct |
2 |
Incorrect |
1 ms |
332 KB |
on inputs (0, 0), (0, 101), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
1096 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
1 ms |
280 KB |
Output is correct |
4 |
Incorrect |
1 ms |
284 KB |
on inputs (0, 0), (1, 0), expected 0, but computed 1 |
5 |
Halted |
0 ms |
0 KB |
- |