제출 #226401

#제출 시각아이디문제언어결과실행 시간메모리
226401AaronNaiduVision Program (IOI19_vision)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; void construct_network(int h, int w, int k) { int totSum = 0; for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { for (int x = i; x < h; x++) { for (int y = 0; y < w; y++) { if (abs(i-x) + abs(j-y) == k) { totSum++; add_and({i*w + j, x*w + y}); } } } } } vector<int> last; for (int i = 0; i < totSum; i++) { last.push_back(i + h * w); } add_or(last); }

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

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:18:25: error: 'add_and' was not declared in this scope
                         add_and({i*w + j, x*w + y});
                         ^~~~~~~
vision.cpp:33:5: error: 'add_or' was not declared in this scope
     add_or(last); 
     ^~~~~~
vision.cpp:33:5: note: suggested alternative: 'rand_r'
     add_or(last); 
     ^~~~~~
     rand_r