Submission #1264832

#TimeUsernameProblemLanguageResultExecution timeMemory
1264832avohado동굴 (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define maxn 200005 #define f first #define s second #define ll long long #define pb(x) push_back(x) void exploreCave(int n){ int f=0, k; bool b=0; int used[n]{}, a[n]{}, kr[n]; if(tryCombination(a)==f){ b=1; } while(f<n){ int l=0, r=n; while(l<r-1){ int m=(l+r)/2; for(int i=l; i<m; i++){ if(!used[i]){ a[i]=(a[i]^1); } } k=tryCombination(a); if((k==f)==b){ l=m; }else{ r=m; b^=1; } } used[l]=1; kr[l]=f; f++; if(b==1){ a[l]^=1; b=(tryCombination(a)==f); }else if(f!=n){ b=(k==f); } } answer(a, kr); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:12:8: error: 'tryCombination' was not declared in this scope
   12 |     if(tryCombination(a)==f){
      |        ^~~~~~~~~~~~~~
cave.cpp:24:15: error: 'tryCombination' was not declared in this scope
   24 |             k=tryCombination(a);
      |               ^~~~~~~~~~~~~~
cave.cpp:36:16: error: 'tryCombination' was not declared in this scope
   36 |             b=(tryCombination(a)==f);
      |                ^~~~~~~~~~~~~~
cave.cpp:41:5: error: 'answer' was not declared in this scope
   41 |     answer(a, kr);
      |     ^~~~~~