This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "vision.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector<int> vi;
typedef vector<pi> vpi;
#define pb emplace_back
#define mp make_pair
#define f first
#define s second
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(),x.end()
#define lb lower_bound
const int MAXN=151000;
const ll MOD=998244353;
vi A;
vi fail;
void construct_network(int H, int W, int K) {
int cur=H*W;
fail.pb(0);fail.pb(1);fail.pb(2);
for(int i=0;i<H;++i)for(int k=0;k<W;++k){
vi X;
for(int j=0;j<H;++j)for(int l=0;l<W;++l){
if(abs(i-j) + abs(k-l) != K)continue;
if(i<j)continue;
X.pb(j*W+l);
}
if(SZ(X))add_or(X);
else add_and(fail);
vi Y;
Y.pb(cur);++cur;
Y.pb(i*W+k);
add_and(Y);
A.pb(cur);
++cur;
}
add_or(A);
return;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |