Submission #1263251

#TimeUsernameProblemLanguageResultExecution timeMemory
1263251bluevioletCave (IOI13_cave)C++20
Compilation error
0 ms0 KiB
#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
const int Inf = (int)2e9 + 7;




bool vst[5009];


void exploreCave(int N) {
    st.clear();
    int n = N;
    int s[N], d[N];

    while (true) {
        int firstClosed = tryCombination(s);
        if (firstClosed == -1) break;

        for (int i=0; i<n; i++) {
        	s[i] ^= 1;
        	if (vst[i]) continue;
        	int pp = tryCombination(s);
        	if (pp == -1) pp = Inf;
        	if (pp > firstClosed) {
        		d[i] = firstClosed;
        		vst[i] = true;
        		break;
        	} else
        		s[i] ^= 1;
        }
    }
    answer(s, d);
}

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:13:5: error: 'st' was not declared in this scope; did you mean 'vst'?
   13 |     st.clear();
      |     ^~
      |     vst