Submission #235078

#TimeUsernameProblemLanguageResultExecution timeMemory
235078UserIsUndefinedVision Program (IOI19_vision)C++14
8 / 100
5 ms384 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; map<pair<int,int> , bool> visited; void construct_network(int H, int W, int K) { std::vector<int> Ns; for (int i = 0 ; i < 1 ; i++){ int row = i/W; int cal = i%W; vector<int> good; for (int j = 0 ; j <= K ; j++){ bool down, up, leftt, rightt; int res = K - j; down = up = leftt = rightt = false; if (row + j < H)down = true; if (row - j >= 0)up = true; if (cal + res < W)rightt = true; if (cal - res >= 0)leftt = true; if (down){ int idx = (row + j)*W; if (leftt){ idx+= (cal - res); if (visited[{i,idx}] != true){; good.push_back(idx); visited[{i, idx}] = visited[{idx, i}] = true; } } if (rightt){ idx = (row + j)*W; idx+= cal + res; if (visited[{i,idx}] != true){ good.push_back(idx); visited[{i, idx}] = visited[{idx, i}] = true; } } } if (up){ if (leftt){ int idx = (row - j)*W; idx+= (cal - res); if (visited[{i,idx}] != true){ good.push_back(idx); visited[{i, idx}] = visited[{idx, i}] = true; } } if (rightt){ int idx = (row - j)*W; idx+= (cal + res); if (visited[{i,idx}] != true){ good.push_back(idx); visited[{i, idx}] = visited[{idx, i}] = true; } } } } for (int x : good){ vector<int> test; test.push_back(i); test.push_back(x); Ns.push_back(add_and(test)); } } add_xor(Ns); }
#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...