Submission #1141584

#TimeUsernameProblemLanguageResultExecution timeMemory
1141584SangCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; #define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; i++) #define FORD(i, a, b) for (int i = (a), _b = (b); i >= _b; i--) #define fi first #define se second #define pb push_back #define ALL(a) (a).begin(), (a).end() #define task "kbsiudthw" typedef vector<int> vi; typedef pair<int, int> ii; typedef pair<int, ii> pii; const int N = 1e5 + 5; const int INF = 0x3f3f3f3f; const int MOD = 1e9 + 2277; void exploreCave(int N){ int S[N] = {0}, P[N] = {0}, B[N] = {0}; bool marked[N] = {0}; FOR (i, 0, N - 1){ FOR (j, 0, N-1) if (marked[j]) S[j] = P[j]; else S[j] = 0; int cur =0 ; if (tryCombination(S) == i) cur ^= 1; int pos = 0; FOR (bit, 0, 12){ FOR (j, 0, N-1) { if (marked[j]) S[j] = P[j]; else if ((j>>bit)&1) S[j] = cur; else S[j] = cur ^ 1; } if (tryCombination(S) != i) pos += (1<<bit); } marked[pos] = 1; P[pos] = cur; B[pos] = i; } answer(P, B); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:27:13: error: 'tryCombination' was not declared in this scope
   27 |         if (tryCombination(S) == i) cur ^= 1;
      |             ^~~~~~~~~~~~~~
cave.cpp:35:17: error: 'tryCombination' was not declared in this scope
   35 |             if (tryCombination(S) != i) pos += (1<<bit);
      |                 ^~~~~~~~~~~~~~
cave.cpp:41:5: error: 'answer' was not declared in this scope
   41 |     answer(P, B);
      |     ^~~~~~