제출 #282753

#제출 시각아이디문제언어결과실행 시간메모리
282753medmdgVision Program (IOI19_vision)C++14
컴파일 에러
0 ms0 KiB
#include "stdio.h" #include<bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K){ int l=0; int r=W*H-1; int m=l+r; m/=2; bool g=true; while(l<=r){ int a[m]; for(int i=0;i<=m;i++){ a[i]=i; } bool d=add_or(a); if(d){ if(add_not(m)==0){ break; } r=m-1; m=l+r; m/=2; continue; } l=m+1; m=l+r; m/=2; } int x=m%W; int y=m/W; for(int i=0;i<H*W;i++){ int xx=i%W; int yy=i/W; if(abs(xx-x)+abs(yy-y)==K){ if(add_not(i)==0){ return; } } } }

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

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:15:16: error: 'add_or' was not declared in this scope
   15 |         bool d=add_or(a);
      |                ^~~~~~
vision.cpp:17:16: error: 'add_not' was not declared in this scope
   17 |             if(add_not(m)==0){
      |                ^~~~~~~
vision.cpp:35:16: error: 'add_not' was not declared in this scope
   35 |             if(add_not(i)==0){
      |                ^~~~~~~
vision.cpp:9:10: warning: unused variable 'g' [-Wunused-variable]
    9 |     bool g=true;
      |          ^