제출 #422682

#제출 시각아이디문제언어결과실행 시간메모리
422682SSRSVision Program (IOI19_vision)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K){ assert(H <= 30 && W <= 30); int cnt = H * W; vector<int> A; for (int x1 = 0; x1 < H; x1++){ for (int y1 = 0; y1 < W; y1++){ for (int x2 = 0; x2 < H; x2++){ for (int y2 = 0; y2 < W; y2++){ if (abs(x2 - x1) + abs(y2 - y1) == K){ int a = x1 * H + y1; int b = x2 * H + y2; if (a < b){ vector<int> id = {a, b}; add_and(id); cnt++; } } } } } } vector<int> id; for (int i = H * W; i < cnt; i++){ id.push_back(i); } add_or(id); }

컴파일 시 표준 에러 (stderr) 메시지

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:16:15: error: 'add_and' was not declared in this scope
   16 |               add_and(id);
      |               ^~~~~~~
vision.cpp:28:3: error: 'add_or' was not declared in this scope
   28 |   add_or(id);
      |   ^~~~~~