Submission #289768

#TimeUsernameProblemLanguageResultExecution timeMemory
289768dvdg6566Vision Program (IOI19_vision)C++14
33 / 100
182 ms1148 KiB
#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; void construct_network(int H, int W, int K) { int cur=H*W; for(int i=0;i<H;++i)for(int j=0;j<H;++j){ for(int k=0;k<W;++k)for(int l=0;l<W;++l){ if(abs(i-j) + abs(k-l) != K)continue; vi X; X.pb(i*W+k); X.pb(j*W+l); // for(auto i:X)cerr<<i<<' ';cerr<<'\n'; add_and(X); // cerr<<"Ok\n"; A.pb(cur);++cur; } } // for(auto t:A)cerr<<t<<' ';cerr<<'\n'; add_or(A); return; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...