Submission #354315

#TimeUsernameProblemLanguageResultExecution timeMemory
354315David_MCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; int c[5003],f[5003],a[5003],i,j,x,l,r,m,e; void exploreCave(int N){ memset(f,0,sizeof(f)); memset(a,0,sizeof(a)); memset(c,0,sizeof(c)); for(i=0;i<N;i++){ e=tryCombination(c); if(e!=-1&&e<=I){ for(int o=0;o<N;o++) if(f[o]==0) c[o]^=1; } l=0;r=N-1; while(l<r){ m=(l+r)/2; for(int o=l;o<=m;o++) if(f[o]==0) c[o]^=1; e=T(i); if(e!=-1&&e<=i)e=1; else e=0; for(int o=l;o<=m;o++) if(f[o]==0) c[o]^=1; if(e) r=m; else l=m+1; } a[l]=i,f[l]=1; }answer(c,a); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:11:16: error: 'I' was not declared in this scope
   11 |   if(e!=-1&&e<=I){
      |                ^
cave.cpp:22:6: error: 'T' was not declared in this scope
   22 |    e=T(i);
      |      ^