#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int a[202][202], r[202], c[202];
int n, m;
bool in(int i, int j) {
return 0 <= i && i < n && 0 <= j && j < m;
}
void construct_network(int H, int W, int K) {
n = H, m = W;
for (int i = 0;i < n;i++) {
for (int j = 0;j < m;j++) {
a[i][j] = i * m + j;
}
}
for (int i = 0;i < n;i++) {
vector<int> Q;
for (int j = 0;j < m;j++) Q.push_back(a[i][j]);
r[i] = add_xor(Q);
}
for (int j = 0;j < m;j++) {
vector<int> Q;
for (int i = 0;i < n;i++) Q.push_back(a[i][j]);
c[j] = add_xor(Q);
}
int same_row = 0, same_col = 0;
{
vector<int> Q;
for (int i = 0;i < n;i++) Q.push_back(r[i]);
same_row = add_not(add_or(Q));
}
{
vector<int> Q;
for (int i = 0;i < m;i++) Q.push_back(c[i]);
same_col = add_not(add_or(Q));
}
int adj_row = 0, adj_col = 0;
{
vector<int> Q;
for (int i = 0;i < n - 1;i++) Q.push_back(add_and({ r[i], r[i + 1] }));
adj_row = add_or(Q);
}
{
vector<int> Q;
for (int i = 0;i < m - 1;i++) Q.push_back(add_and({ c[i], c[i + 1] }));
adj_col = add_or(Q);
}
add_or({ add_and({same_row, adj_col}), add_and({same_col, adj_row}) });
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
348 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
1372 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
2 ms |
604 KB |
Output is correct |
5 |
Incorrect |
0 ms |
348 KB |
WA in grader: Instruction with no inputs |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |