Submission #372397

#TimeUsernameProblemLanguageResultExecution timeMemory
372397amano_hinaCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h" void exploreCave(int n) { int a[n],b[n],f[n],mid,ans,ans2,have[n]; for(int i=0;i<n;i++) { f[i]=i; a[i]=0; } for(int i=0;i<n;i++) { ans=tryCombination(a); l=0; r=n-1-i; while(l<r) { mid=(l+r)/2; for(int j=l;j<=m;j++) { a[f[j]]=1-a[f[j]]; } ans2=tryCombination(a); if(ans==ans2) { l=m+1; } else { r=m; } ans=ans2; } if(ans!=i) { a[l]=1-a[l]; b[l]=i; } for(int j=l;j<n-1-i;j++) { f[j]=f[j+1]; } } void answer(a[],b[]); /* ... */ }

Compilation message (stderr)

cave.cpp:47:25: error: stray '\315' in program
   47 |     void answer(a[],b[]);
      |                         ^
cave.cpp:47:26: error: stray '\276' in program
   47 |     void answer(a[],b[]);
      |                          ^
cave.cpp: In function 'void exploreCave(int)':
cave.cpp:14:9: error: 'l' was not declared in this scope
   14 |         l=0;
      |         ^
cave.cpp:15:9: error: 'r' was not declared in this scope
   15 |         r=n-1-i;
      |         ^
cave.cpp:19:28: error: 'm' was not declared in this scope
   19 |             for(int j=l;j<=m;j++)
      |                            ^
cave.cpp:26:19: error: 'm' was not declared in this scope
   26 |                 l=m+1;
      |                   ^
cave.cpp:30:19: error: 'm' was not declared in this scope
   30 |                 r=m;
      |                   ^
cave.cpp:47:17: error: variable or field 'answer' declared void
   47 |     void answer(a[],b[]);
      |                 ^
cave.cpp:47:19: error: expected primary-expression before ']' token
   47 |     void answer(a[],b[]);
      |                   ^
cave.cpp:47:23: error: expected primary-expression before ']' token
   47 |     void answer(a[],b[]);
      |                       ^
cave.cpp:4:37: warning: unused variable 'have' [-Wunused-variable]
    4 |     int a[n],b[n],f[n],mid,ans,ans2,have[n];
      |                                     ^~~~