Submission #245728

#TimeUsernameProblemLanguageResultExecution timeMemory
245728uacoder123Cave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; void explorecave(int N) { int n=N; int arr[n]={}; while(trycombination(arr)) { int ix,x=trycombination(arr); i=0; ix=x; while(ix==x) { arr[i]^=1; int iix=trycombination(arr); if(iix<=ix&&ix!=-1) arr[i]^=1; else x=iix; } } int d[n]; for(int i=0;i<n;++i) { arr[i]^=1; d[i]=trycombination(arr); arr[i]^=1; } answer(arr,d); exit(0); }

Compilation message (stderr)

cave.cpp: In function 'void explorecave(int)':
cave.cpp:8:9: error: 'trycombination' was not declared in this scope
   while(trycombination(arr))
         ^~~~~~~~~~~~~~
cave.cpp:8:9: note: suggested alternative: 'tryCombination'
   while(trycombination(arr))
         ^~~~~~~~~~~~~~
         tryCombination
cave.cpp:11:5: error: 'i' was not declared in this scope
     i=0;
     ^
cave.cpp:27:10: error: 'trycombination' was not declared in this scope
     d[i]=trycombination(arr);
          ^~~~~~~~~~~~~~
cave.cpp:27:10: note: suggested alternative: 'tryCombination'
     d[i]=trycombination(arr);
          ^~~~~~~~~~~~~~
          tryCombination