Submission #1026716

#TimeUsernameProblemLanguageResultExecution timeMemory
1026716Gr1senVision Program (IOI19_vision)C++17
Compilation error
0 ms0 KiB
#include "vision.h" #include<vector> #include<iostream> #include<algorithm> using namespace std; #define vi vector<int> void H1(int w, int k) { if (k >= w) { add_not(0); return; } vi L; int c = w; for (int i = 0; i < w-k; i++) { add_and({i, i+k}); L.push_back(c); c++; } add_or(L); } void construct_network(int H, int W, int K) { if (H == 1) { H1(w, k); return; } if (W == 1) { H1(H, k); return; } }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:27:6: error: 'w' was not declared in this scope
   27 |   H1(w, k);
      |      ^
vision.cpp:27:9: error: 'k' was not declared in this scope
   27 |   H1(w, k);
      |         ^
vision.cpp:31:9: error: 'k' was not declared in this scope
   31 |   H1(H, k);
      |         ^