#include "vision.h"
#include <bits/stdc++.h>
using namespace std;
void construct_network(int H, int W, int K) {
vector <int> v;
for(int i=0;i<H;i++)
{
v.clear();
for(int j=0;j<W;j++)
{
v.push_back(W*i+j);
}
add_or(v);
}
for(int i=0;i<W;i++)
{
v.clear();
for(int j=0;j<H;j++)
{
v.push_back(W*j+i);
}
add_or(v);
}
vector <int> Hh, Ww, tmp;
Hh.resize(H), Ww.resize(W);
for(int i=1;i<H;i++)
{
if(i>K) break;
v.clear();
for(int j=0;j<H-i;j++)
{
v.push_back(add_and({H*W+j, H*W+i+j}));
}
Hh[i]=add_or(v);
}
v.clear();
for(int i=0;i<H;i++) v.push_back(H*W+i);
Hh[0]=add_xor(v);
for(int i=1;i<W;i++)
{
if(i>K) break;
v.clear();
for(int j=0;j<W-i;j++)
{
v.push_back(add_and({H*W+H+j, H*W+H+i+j}));
}
Ww[i]=add_or(v);
}
v.clear();
for(int i=0;i<W;i++) v.push_back(H*W+H+i);
Ww[0]=add_xor(v);
v.clear();
for(int i=0;i<=K;i++)
{
if(i>=H || K-i>=W) continue;
v.push_back(add_and({Hh[i], Ww[K-i]}));
}
add_or(tmp);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
384 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
256 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
640 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
256 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |