Submission #1195639

#TimeUsernameProblemLanguageResultExecution timeMemory
1195639NonbangkokCave (IOI13_cave)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" #define coutf(n, m) cout << fixed << setprecision(n) << m #define forr(i, a, n) for (int i = a; i < n; i++) #define forl(i, a, n) for (int i = a; i > n; i--) #define macos ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define endll "\n" #define sp " " typedef long long ll; using namespace std; void exploreCave(int N) { int idx = 0, a[n] = {}, b[n]; for (int i = 0; i < n; i++) b[i] = i; while ((idx = tryCombination(a)) != -1) { a[idx] = 1; } answer(a, b); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:13:20: error: 'n' was not declared in this scope
   13 |     int idx = 0, a[n] = {}, b[n];
      |                    ^
cave.cpp:14:33: error: 'b' was not declared in this scope
   14 |     for (int i = 0; i < n; i++) b[i] = i;
      |                                 ^
cave.cpp:15:34: error: 'a' was not declared in this scope
   15 |     while ((idx = tryCombination(a)) != -1) {
      |                                  ^
cave.cpp:18:12: error: 'a' was not declared in this scope
   18 |     answer(a, b);
      |            ^
cave.cpp:18:15: error: 'b' was not declared in this scope
   18 |     answer(a, b);
      |               ^