Submission #370350

#TimeUsernameProblemLanguageResultExecution timeMemory
370350MilosMilutinovicVision Program (IOI19_vision)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> //#include "vision.h" using namespace std; #define pb push_back const int N=205; int h,w,k,a[N][N]; int Get(int i,int j){return a[i][j];} void SolveBF(){ int tmp=0; for(int i=0;i<h;i++)for(int j=0;j<w;j++)a[i][j]=tmp++; vector<int> ask; int cnt=h*w; for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ for(int x=0;x<h;x++){ for(int y=0;y<w;y++){ if(i>x&&j>y)continue; int dist=abs(x-i)+abs(y-j); if(dist!=k)continue; add_and({Get(i,j),Get(x,y)}); ask.pb(cnt); cnt++; } } } } if((int)ask.size()==0){ add_not(1); return; } add_or(ask); } void construct_network(int H,int W,int K){ h=H,w=W,k=K; if(max(H,W)<=30){ SolveBF(); return; } }

Compilation message (stderr)

vision.cpp: In function 'void SolveBF()':
vision.cpp:20:6: error: 'add_and' was not declared in this scope
   20 |      add_and({Get(i,j),Get(x,y)});
      |      ^~~~~~~
vision.cpp:28:3: error: 'add_not' was not declared in this scope
   28 |   add_not(1);
      |   ^~~~~~~
vision.cpp:31:2: error: 'add_or' was not declared in this scope
   31 |  add_or(ask);
      |  ^~~~~~