Submission #1263247

#TimeUsernameProblemLanguageResultExecution timeMemory
1263247bluevioletCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h" #include <bits/stdc++.h> using namespace std; int s[5009], d[5009]; set<int> st; void exploreCave(int N) { st.clear(); for (int i = 0; i < N; i++) { s[i] = 0; d[i] = 0; } while (true) { int firstClosed = tryCombination(s); if (firstClosed == -1) break; for (int i=0; i<n; i++) { s[i] ^= 1; int pp = tryCombination(s); if (pp == -1) pp = Inf; if (pp > firstClosed) { d[i] = firstClosed; break; } else s[i] ^= 1; } } answer(s, d); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:21:25: error: 'n' was not declared in this scope
   21 |         for (int i=0; i<n; i++) {
      |                         ^
cave.cpp:24:36: error: 'Inf' was not declared in this scope; did you mean 'ynf'?
   24 |                 if (pp == -1) pp = Inf;
      |                                    ^~~
      |                                    ynf