Submission #1210833

#TimeUsernameProblemLanguageResultExecution timeMemory
1210833LIA동굴 (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 c1 = tryCombination(cop), c2 = tryCombination(s); if (c1==-1) c1 = n; if (c1 == i &&c2>=i) { of_prev[j] = 1; s[j] = 0; loc[i] = j; break; } if (c1>=i && c2==i) { of_prev[j] = 1; s[j] = 1; loc[i] = j; break; } } } } answer(s, loc); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:34:16: error: 'tryCombination' was not declared in this scope
   34 |        ll c1 = tryCombination(cop), c2 = tryCombination(s);
      |                ^~~~~~~~~~~~~~
cave.cpp:36:22: error: 'c2' was not declared in this scope; did you mean 'c1'?
   36 |        if (c1 == i &&c2>=i) {
      |                      ^~
      |                      c1
cave.cpp:42:21: error: 'c2' was not declared in this scope; did you mean 'c1'?
   42 |        if (c1>=i && c2==i) {
      |                     ^~
      |                     c1
cave.cpp:51:3: error: 'answer' was not declared in this scope
   51 |   answer(s, loc);
      |   ^~~~~~