제출 #992269

#제출 시각아이디문제언어결과실행 시간메모리
992269MarwenElarbiVision Program (IOI19_vision)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> //#include "vision.h" using namespace std; #define fi first #define se second #define ll long long #define pb push_back void construct_network(int H, int W, int K) { bool grid[H+1][W]; pair<int,int> fst={-1,-1}; pair<int,int> lst={-1,-1}; pair<int,int> wa={-1,-1}; for (int i = 0; i < H; ++i) { for (int j = 0; j < W; ++j) { grid[i][j]=add_and({i*H+j}); //cout <<grid[i][j]<<" "; if(grid[i][j]==1&&fst==make_pair(-1,-1)){ fst={i,j}; }else if(grid[i][j]==1){ lst={i,j}; } }//cout <<endl; } //cout <<fst.fi<<" "<<fst.se<<" "<<lst.fi<<" "<<lst.se<<endl; if(abs(fst.fi-lst.fi)+abs(lst.se-fst.se)==K) add_and({fst.fi*H+fst.se}); else add_not(fst.fi*H+fst.se); return; } int add_and(std::vector<int> Ns); int add_or(std::vector<int> Ns); int add_xor(std::vector<int> Ns); int add_not(int N);

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

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:20:24: error: 'add_and' was not declared in this scope
   20 |             grid[i][j]=add_and({i*H+j});
      |                        ^~~~~~~
vision.cpp:30:50: error: 'add_and' was not declared in this scope
   30 |     if(abs(fst.fi-lst.fi)+abs(lst.se-fst.se)==K) add_and({fst.fi*H+fst.se});
      |                                                  ^~~~~~~
vision.cpp:31:10: error: 'add_not' was not declared in this scope
   31 |     else add_not(fst.fi*H+fst.se);
      |          ^~~~~~~