#include <bits/stdc++.h>
#include "vision.h"
using namespace std;
#define flash ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define debug(x) cerr << " - " << #x << ": " << x << endl;
#define debugs(x, y) cerr << " - " << #x << ": " << x << " " << #y << ": " << y << endl;
#define all(x) (x).begin(),(x).end()
#define sz(x) (ll)x.size()
#define ll long long
#define INF 1000000000
#define pb push_back
struct greateri
{
template<class T>
bool operator()(T const &a, T const &b) const { return a > b; }
};
map<pair<int,int>,int>gg;
void construct_network(int H,int W,int K)
{
//flash;
vector<int>zeros;
for (int i = 0; i < H; ++i)
{
for (int j = 0; j < W; ++j)
{
int cell=i*W+j;
zeros.pb(cell);
}
}
int last=H*W;
for (int i = 0; i < H; ++i)
{
for (int j = 0; j < W; ++j)
{
for (int ka = 0; ka < H; ++ka)
{
for (int c = 0; c < W; ++c)
{
int cell1=i*W+j;
int cell2=ka*W+c;
if(ka!=i && c!=j && gg.find({min(cell1,cell2),max(cell1,cell2)})==gg.end())
{
gg[{min(cell1,cell2),max(cell1,cell2)}]=1;
vector<int>now;
now.pb(cell1),now.pb(cell2);
add_and(now);
if(abs(i-ka)+abs(j-c) == K)
add_or(zeros);
else add_and(zeros);
last+=2;}
}
}
}
}
int last1=last;
last--;
vector<int>lasti;
for (int i = W*H; i < last1; i+=2)
{
vector<int>now;
now.pb(i);now.pb(i+1);
add_and(now);
lasti.pb(last);
last++;
}
add_not(add_xor(lasti));
return;
}
//code the AC sol !
// BS/queue/map
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 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 |
376 KB |
on inputs (0, 0), (1, 1), expected 0, but computed 1 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
7 ms |
4564 KB |
WA in grader: Too many inputs |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
WA in grader: Instruction with no inputs |
2 |
Halted |
0 ms |
0 KB |
- |