Submission #1063664

#TimeUsernameProblemLanguageResultExecution timeMemory
1063664aaaaaarrozVision Program (IOI19_vision)C++17
Compilation error
0 ms0 KiB
#include "vision.h" #include <bits/stdc++.h> using namespace std; bool limites(int x, int y, int h, int w) { return x >= 0 && x < h && y >= 0 && y < w; } void construct_network(int H, int W, int K) { map<int,pair<int, int>> numero; int pos = 0; vector<int>black; for (int i = 0; i < H; i++) { for (int j = 0; j < W; j++) { numero[pos] = {i,j}; bool is_bl=add_or({pos}); if(is_bl){ black.push_back(pos;) } pos++; } } int dist=abs(numero[black[0]].first-numero[black[1]].first)+abs(numero[black[0]].second-numero[black[1]].second); if(dist==K){ add_or({black[0]}); return; } else{ for(int i=0;i<H*W;i++){ if(black[0]!=i&&black[1]!=i){ add_or({i}); return; } } } }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:17:24: error: expected ')' before ';' token
   17 |     black.push_back(pos;)
      |                    ~   ^
      |                        )
vision.cpp:17:25: error: expected primary-expression before ')' token
   17 |     black.push_back(pos;)
      |                         ^