#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
int n, m;
int getCell(int i, int j) { return i*m + j; }
void construct_network(int H, int W, int K)
{
n = H; m = W;
vector< int > all;
int curInd = H*W - 1;
for(int i = 0 ; i < n ; i++)
{
vector< int > q;
for(int j = 0 ; j < m ; j++)
q.push_back( getCell( i , j ) );
curInd++;
add_xor( q );
}
for(int j = 0 ; j < m ; j++)
{
vector< int > q;
for(int i = 0 ; i < n ; i++)
q.push_back( getCell( i , j ) );
curInd++;
add_xor( q );
}
//Lines [h*w , h*w + n - 1]
int L = curInd;
int R = curInd;
for(int i = 0 ; i < n - 1 ; i++)
{
vector< int > aux;
aux.push_back( H*W + i );
aux.push_back( H*W + i + 1 );
R++;
add_and( aux );
}
for(int i = 0 ; i < m - 1 ; i++)
{
vector< int > aux;
aux.push_back( H*W + n + i );
aux.push_back( H*W + n + i + 1 );
R++;
add_and( aux );
}
vector< int > aux;
for(int i = L ; i <= R ; i++)
aux.push_back( i );
add_or( aux );//R + 1
add_xor( aux );//R + 2
aux.clear();
aux.push_back( R + 1 );
aux.push_back( R + 2 );
add_and( aux );
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
380 KB |
on inputs (0, 0), (0, 198), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
376 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 |
14 ms |
1144 KB |
on inputs (57, 107), (59, 108), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
256 KB |
on inputs (0, 0), (0, 2), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |