Submission #1058608

#TimeUsernameProblemLanguageResultExecution timeMemory
1058608UnforgettableplVision Program (IOI19_vision)C++17
52 / 100
2 ms604 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { bool special_case = min(H,W)>1 and max(H,W)>30; vector<int> cultprits; int lig = H*W; for(int i=0;i<(special_case?1:H);i++) { for(int j=0;j<(special_case?1:W);j++) { vector<int> subcurprits; for(int k=i;k<H;k++) { for(int l=(k==i?j:0);l<W;l++) { if(abs(i-k)+abs(j-l)!=K)continue; subcurprits.emplace_back(k*W+l); } } if(subcurprits.empty())continue; add_or(subcurprits); add_and({i*W+j,lig++}); cultprits.emplace_back(lig++); } } add_or(cultprits); }
#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...