Submission #922431

#TimeUsernameProblemLanguageResultExecution timeMemory
922431ttamxVision Program (IOI19_vision)C++14
Compilation error
0 ms0 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { vector<int> res; for(int xi=0;xi<H;xi++){ for(int yi=0;yi<W;yi++){ for(int xj=0;x<=xi;xj++){ for(int yj=0;yj<=yi;yj++){ if(xi-xj+yi-yj==K){ res.push_back(add_and({xi*W+yi,xj*W+yj}); } } } } } add_or(res); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:10:23: error: 'x' was not declared in this scope; did you mean 'xj'?
   10 |          for(int xj=0;x<=xi;xj++){
      |                       ^
      |                       xj
vision.cpp:13:62: error: expected ')' before ';' token
   13 |                      res.push_back(add_and({xi*W+yi,xj*W+yj});
      |                                   ~                          ^
      |                                                              )