#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
int num[201][201];
void construct_network(int H, int W, int K)
{
int idx = 0;
for (int i=1;i<=H;i++) for (int j=1;j<=W;j++) num[i][j] = idx++;
vector <int> or_arr;
for (int i=1;i<=H;i++) for (int j=1;j<=W;j++){
vector <int> xor_arr;
for (int dy=-K;dy<=K;dy++){
for (int sx=-1;sx<2;sx+=2){
int dx = sx*(K-abs(dy));
int y = i+dy, x = j+dx;
if (y < 1 || y > H || x < 1 || x > W) continue;
xor_arr.push_back(num[y][x]);
}
}
if (xor_arr.empty()) continue;
int x = add_xor(xor_arr);
or_arr.push_back(add_and({x, num[i][j]}));
}
add_or(or_arr);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
296 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Incorrect |
2 ms |
256 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
296 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Incorrect |
2 ms |
256 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
296 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Incorrect |
2 ms |
256 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
296 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Incorrect |
2 ms |
256 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
3 ms |
432 KB |
Output is correct |
3 |
Correct |
3 ms |
376 KB |
Output is correct |
4 |
Correct |
2 ms |
360 KB |
Output is correct |
5 |
Incorrect |
2 ms |
504 KB |
on inputs (0, 0), (2, 0), expected 1, but computed 0 |
6 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
348 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
1268 KB |
WA in grader: Too many instructions |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
296 KB |
Output is correct |
2 |
Correct |
2 ms |
256 KB |
Output is correct |
3 |
Incorrect |
2 ms |
256 KB |
on inputs (0, 0), (1, 0), expected 1, but computed 0 |
4 |
Halted |
0 ms |
0 KB |
- |