#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
int bits[11];
int rows[205],col[205];
vector <int> mv(int a, int b=-1)
{
vector <int> w;
w.push_back(a);
w.push_back(b);
return w;
}
void add(int delta)
{
int ost = delta;
for(int i=0;i<10;i++)
{
int newid = add_xor(mv(ost,bits[i]));
ost = add_and(mv(ost,bits[i]));
bits[i] = newid;
}
}
void construct_network(int H, int W, int K) {
vector<int> w;
cout<<"OK"<<endl;
int i;
int zero = add_and(mv(add_not(0),0));
for(i=0;i<10;i++)bits[i] = add_and(mv(zero,0));
int curr = zero;
for(i=0;i<H;i++)
{
w.clear();
w.push_back(curr);
for(int j=0;j<W;j++)
{
w.push_back(i*W+j);
}
curr = add_xor(w);
add(curr);
}
curr = zero;
for(i=0;i<W;i++)
{
w.clear();
w.push_back(curr);
for(int j=0;j<H;j++)
{
w.push_back(j*W+i);
}
curr = add_xor(w);
add(curr);
}
curr = zero;
w.clear();
// w.push_back(curr);
for(i=0;i<10;i++)
{
if((1<<i)&K)
{
w.push_back(bits[i]);
}
else
w.push_back(add_not(bits[i]));
}
add_and(w);
return ;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
5 ms |
608 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
16 ms |
1732 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
secret mismatch |
2 |
Halted |
0 ms |
0 KB |
- |