Submission #922443

#TimeUsernameProblemLanguageResultExecution timeMemory
922443WarinchaiVision Program (IOI19_vision)C++14
33 / 100
1065 ms194132 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; int dis(int i,int j,int x,int y){ return (abs(i-x)+abs(j-y)); } vector<int>v; map<pair<pair<int,int>,pair<int,int>>,int>mp; void construct_network(int H, int W, int K) { for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ for(int i2=0;i2<H;i2++){ for(int j2=0;j2<W;j2++){ if(mp[{{i,j},{i2,j2}}]||mp[{{i2,j2},{i,j}}])continue; mp[{{i,j},{i2,j2}}]++; mp[{{i2,j2},{i,j}}]++; if(dis(i,j,i2,j2)==K){ v.push_back(add_and({i*W+j,i2*W+j2})); } } } } } add_or(v); }
#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...