Submission #1027782

#TimeUsernameProblemLanguageResultExecution timeMemory
10277820npataVision Program (IOI19_vision)C++17
33 / 100
386 ms1060 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; #define vec vector void construct_network(int H, int W, int K) { //cerr << H << ' ' << W << ' ' << K << '\n'; auto dist = [&](int i, int j) { int x1 = i%W; int y1 = i/W; int x2 = j%W; int y2 = j/W; return abs(x1-x2)+abs(y1-y2); }; int cnt = 0; for(int i = 0; i<H*W; i++) { for(int j = i+1; j<H*W; j++) { if(dist(i, j) == K) { add_and({i, j}); // cerr << "HERE" << '\n'; cnt++; } } } // cerr << "OK" << '\n'; vec<int> or_check(cnt); // cerr << cnt << '\n'; iota(or_check.begin(), or_check.end(), H*W); add_or(or_check); }
#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...