Submission #478341

#TimeUsernameProblemLanguageResultExecution timeMemory
478341blueVision Program (IOI19_vision)C++17
Compilation error
0 ms0 KiB
#include "vision.h" #include <vector> #include <cmath> using namespace std; void construct_network(int H, int W, int K) { vector<int> ops; for(int i = 0; i < H; i++) { for(int j = 0; j < W; j++) { for(int i1 = i; i1 < H; i1++) { for(int j1 = 0; j1 < W; j1++) { if(i == i1 && j1 < j) continue; if(abs(i - i1) + abs(j - j1) != K) continue; ops.push_back(add_and(W*i + j, W*i1 + j1)); } } } } add_or(ops); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:19:47: error: could not convert '((W * i) + j)' from 'int' to 'std::vector<int>'
   19 |                     ops.push_back(add_and(W*i + j, W*i1 + j1));
      |                                           ~~~~^~~
      |                                               |
      |                                               int