#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
#define pb push_back
int check(int H,int W,int K){
int sz=H+W-2;
vector<int> x[sz+1],y[sz+1];
for(int i=0;i<=sz;i++)x[i].clear(),y[i].clear();
for(int i=0;i<H;i++){
for(int j=0;j<W;j++){
x[i+j].pb(i*W+j);
y[i+W-j-1].pb(i*W+j);
}
}
vector<int> d[5];
for(int i=0;i<=sz;i++){
d[0].pb(add_or(x[i]));
d[1].pb(add_or(y[i]));
d[2].pb(add_or(d[0]));
d[3].pb(add_or(d[1]));
if(i>K){
d[4].pb(add_and({d[0][i],d[2][i-K]}));
d[4].pb(add_and({d[1][i],d[3][i-K]}));
}
}
return add_or(d[4]);
}
void construct_network(int H,int W,int K){
if(H+W-2==K)check(H,W,K);
else{
add_xor({check(H,W,K),check(H,W,K+1)});
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
1260 KB |
Output is correct |
2 |
Correct |
12 ms |
1132 KB |
Output is correct |
3 |
Correct |
10 ms |
1132 KB |
Output is correct |
4 |
Incorrect |
1 ms |
620 KB |
WA in grader: Instruction with no inputs |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
59 ms |
5992 KB |
Output is correct |
2 |
Incorrect |
1 ms |
364 KB |
WA in grader: Instruction with no inputs |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
364 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |