#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
void construct_network(int H, int W, int K) {
vector<int> ROW, COL; ROW.clear(), COL.clear();
for(int i = 0; i < H; i++)
{
vector<int> rows; rows.clear();
for(int j = 0; j < W; j++) rows.pb(i*W+j);
ROW.pb(add_xor(rows));
}
for(int i = 0; i < H; i++)
{
vector<int> cols; cols.clear();
for(int j = 0; j < W; j++) cols.pb(j*W+i);
COL.pb(add_xor(cols));
}
int x = add_or(ROW), y = add_or(COL);
vector<int> t; t.clear(), t.pb(x), t.pb(add_not(y));
int option1f = add_and(t);
t.clear(), t.pb(y), t.pb(add_not(x));
int option2f = add_and(t);
vector<int> row_pair, col_pair; row_pair.clear(), col_pair.clear();
for(int i = H*W; i < H*W+H-1; i++)
{
t.clear(); t.pb(i), t.pb(i+1);
row_pair.pb(add_and(t));
}
for(int i = H*W+H; i < H*W+H+W-1; i++)
{
t.clear(); t.pb(i), t.pb(i+1);
col_pair.pb(add_and(t));
}
int option1s = add_or(row_pair);
int option2s = add_or(col_pair);
t.clear(), t.pb(option1f), t.pb(option1s);
int option1 = add_and(t);
t.clear(), t.pb(option2f), t.pb(option2s);
int option2 = add_and(t);
t.clear(), t.pb(option1), t.pb(option2);
add_or(t);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Incorrect |
1 ms |
204 KB |
on inputs (0, 0), (0, 1), expected 0, but computed 1 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1100 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Incorrect |
2 ms |
332 KB |
on inputs (96, 18), (96, 19), expected 1, but computed 0 |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
WA in grader: Invalid index |
2 |
Halted |
0 ms |
0 KB |
- |