Submission #1210953

#TimeUsernameProblemLanguageResultExecution timeMemory
1210953LIACave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef int ll; typedef tuple<ll, ll, ll> plll; typedef vector<plll> vplll; typedef pair<ll, ll> pll; typedef vector<ll> vll; typedef vector<pll> vpll; typedef vector<vector<pll>> vvpll; typedef vector<vector<ll>> vvll; typedef vector<bool> vb; typedef vector<vector<bool>> vvb; #define loop(i, s, e) for (ll i = (s); i < (e); ++i) #define loopr(i, e, s) for (ll i = (e)-1; i >= (s); --i) #define all(a) a.begin(), a.end() const ll inf = 1e9 + 7; void exploreCave(int n) { ll s[n]; loop(i,0,n) { s[i] = 0; } ll loc[n]; vb of_prev(n, false); loop(i,0,n) { loop(j,0,n) { if (of_prev[j] == false) { ll cop[n]; loop(c,0,n) cop[c] = s[c]; cop[j] = 1; ll cs = tryCombination(s), ccop = tryCombination(cop); if (cs==-1) cs = n; if (ccop==-1) ccop = n; if (cs==i) {// if 1 is coorect here - ccop of_prev[j] = 1; s[j] = 1; loc[j] = i; break; } if (ccop==i) {// if 0 is coorect here - cs of_prev[j] = 1; s[j] = 0; loc[j] = i; break; } } } } answer(s, loc); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:31:16: error: 'tryCombination' was not declared in this scope
   31 |        ll cs = tryCombination(s), ccop = tryCombination(cop);
      |                ^~~~~~~~~~~~~~
cave.cpp:33:12: error: 'ccop' was not declared in this scope; did you mean 'cop'?
   33 |        if (ccop==-1) ccop = n;
      |            ^~~~
      |            cop
cave.cpp:40:12: error: 'ccop' was not declared in this scope; did you mean 'cop'?
   40 |        if (ccop==i) {// if 0 is coorect here - cs
      |            ^~~~
      |            cop
cave.cpp:49:3: error: 'answer' was not declared in this scope
   49 |   answer(s, loc);
      |   ^~~~~~