Submission #103619

#TimeUsernameProblemLanguageResultExecution timeMemory
103619turbatCave (IOI13_cave)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "cave.h" void exploreCave(int N) { int a[N], s[N], d[N], found[N],l, r, t; memset(s, 0, sizeof s); memset(d, 0, sizeof d); for (int i = 0;i < N;i++) for (int i = 0;i < N;i++){ for (int i = 0;i < N;i++) a[i] = s[i]; if (tryCombination(a) > i) t = 0; else t = 1; l = 0, r = n - 1; while (l != r){ a = s; int mid = 0; for (int i = l;i <= mid;i++) if (!found[i]) a[i] = t; if (tryCombination(a) > i) r = mid; else l = mid + 1; } d[l] = i; found[l] = 1; s[l] = t; } answer(s, d); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:15:14: error: 'n' was not declared in this scope
   l = 0, r = n - 1;
              ^
cave.cpp:17:8: error: invalid array assignment
    a = s;
        ^