Submission #982297

#TimeUsernameProblemLanguageResultExecution timeMemory
982297irmuunVision Program (IOI19_vision)C++17
0 / 100
1 ms1116 KiB
#include<bits/stdc++.h> #include "vision.h" using namespace std; #define ll long long #define pb push_back #define ff first #define ss second #define all(s) s.begin(),s.end() #define rall(s) s.rbegin(),s.rend() void construct_network(int H,int W,int K){ vector<int>row,col; int cur=H*W; for(int i=0;i<H;i++){ vector<int>Ns; for(int j=0;j<W;j++){ Ns.pb(i*W+j); } int a=add_or(Ns); cur++; if(a==1){ row.pb(i); } } for(int j=0;j<W;j++){ vector<int>Ns; for(int i=0;i<H;i++){ Ns.pb(i*W+j); } int a=add_or(Ns); cur++; if(a==1){ col.pb(j); } } if(row.size()==2&&col.size()==2){ add_and({row[0]*W+col[0],row[1]*W+col[1]}); add_and({row[0]*W+col[1],row[1]*W+col[0]}); add_or({cur,cur+1}); } if(row.size()==2&&col.size()==2){ add_and({row[0]*W+col[0],row[1]*W+col[1]}); add_and({row[0]*W+col[1],row[1]*W+col[0]}); add_or({cur,cur+1}); } else if(row.size()==2&&col.size()==1){ add_and({row[0]*W+col[0],row[1]*W+col[0]}); } else{ add_and({row[0]*W+col[0],row[0]*W+col[1]}); } }
#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...