Submission #598009

#TimeUsernameProblemLanguageResultExecution timeMemory
598009JohannVision Program (IOI19_vision)C++14
12 / 100
5 ms1084 KiB
#include "vision.h" using namespace std; typedef vector<int> vi; int h,w,k; int calc_pos(int x, int y) { return y * w + x; } void construct_network(int H, int W, int K) { h = H; w = W; k = K; vi all(0); for (int x = 0; x < W; ++x) { for (int y = 0; y < H; ++y) { for (int dx = -K; dx <= K; ++dx) { int nx = x + dx, ny = y + abs(dx - K); if (0 <= nx && nx < W && 0 <= ny && ny < H) all.push_back(add_and({calc_pos(x,y), calc_pos(nx,ny)})); } } } add_or(all); }
#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...