Submission #856393

#TimeUsernameProblemLanguageResultExecution timeMemory
856393Trisanu_DasVision Program (IOI19_vision)C++17
Compilation error
0 ms0 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; void construct_network(int h, int w, int k){ int total = h * w; for(int i = 0; i < h * w; i++){ for(int j = i + 1; j < h * w; j++){ if(abs(i / w - j / w) + abs(i % w - j % w) == K){ add_and({i, j}); total++; } } } vector<int> ans; for(int i = h * w; i < total; i++) ans.push_back(i); add_or(ans); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:9:57: error: 'K' was not declared in this scope
    9 |           if(abs(i / w - j / w) + abs(i % w - j % w) == K){
      |                                                         ^