#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
typedef long long ll;
int solve(int H, int W, int K){
vector<int> X[405], Y[405];
for(int i = 0; i < H; i ++){
for(int j = 0; j < W; j ++){
X[i + j].push_back(i * W + j);
Y[i + W - 1 - j].push_back(i * W + j);
}
}
vector<int> allX, allY, prefX, prefY, result;
for(int i = 0; i <= H + W - 2; i ++){
allX.push_back(add_or(X[i]));
allY.push_back(add_or(Y[i]));
prefX.push_back(add_or(allX));
prefY.push_back(add_or(allY));
if(i >= K){
result.push_back(add_and({allX[i], prefX[i - K]}));
result.push_back(add_and({allY[i], prefY[i - K]}));
}
}
return add_or(result);
}
void construct_network(int H, int W, int K) {
if(H + W - 2 == K)
solve(H, W, K);
else
add_xor({solve(H, W, K), solve(H, W, K - 1)});
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
11 ms |
1100 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
328 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
57 ms |
5792 KB |
on inputs (80, 199), (81, 199), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 1, but computed 0 |
2 |
Halted |
0 ms |
0 KB |
- |