Submission #429335

#TimeUsernameProblemLanguageResultExecution timeMemory
429335PbezzVision Program (IOI19_vision)C++14
33 / 100
2 ms1096 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back typedef pair<ll,ll>pii; const ll MAXN = 9500; const ll INF = 1e9+7; void construct_network(int H, int W, int K){ vector<int>Ns,fina; int d,x,y,a,i,cur,cur1; if(H==1){ for(i=0;i+K<W;i++){ Ns = {i,i+K}; d = add_and(Ns); fina.pb(d); } add_or(fina); return; }else if(W==1){ for(i=0;i+K<H;i++){ Ns = {i,i+K}; d = add_and(Ns); fina.pb(d); } add_or(fina); return; } for(x=0;x<H;x++){ for(y=0;y<W;y++){ cur = x*W + y; for(i=0;i<=K;i++){ a = K-i+x; if(i+y<W&&a<H){ cur1 = a*W + y+i; Ns = {cur,cur1}; d = add_and(Ns); fina.pb(d); } if(y-i>=0&&a<H){ cur1 = a*W + y-i; Ns = {cur,cur1}; d = add_and(Ns); fina.pb(d); } } } } add_or(fina); }
#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...