Submission #1283995

#TimeUsernameProblemLanguageResultExecution timeMemory
1283995talyCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define pii pair<int, int> #define tii tuple<int, int, int> #define lli long long // #define f first // #define s second #define pb push_back using namespace std; void exploreCave(int n){ vector<int> s(n), d(n, -1); int c = 0; int f1 = tryCombination(s); int f2 = f1; int last = -1; while(f2!=n){ while(f1==f2){ while(d[last]!=-1)last++; s[last]=1-s[last]; f2 = tryCombination(s); } if(f2==-1)f2=n; if(f1<f2){ d[f1]=last; c++; }else{ d[f2]=last; s[f2]=1-s[f2]; c++; } f1=f2; } answer(s, d); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:13:14: error: 'tryCombination' was not declared in this scope
   13 |     int f1 = tryCombination(s);
      |              ^~~~~~~~~~~~~~
cave.cpp:33:5: error: 'answer' was not declared in this scope
   33 |     answer(s, d);
      |     ^~~~~~