Submission #1312087

#TimeUsernameProblemLanguageResultExecution timeMemory
1312087eri16Sphinx's Riddle (IOI24_sphinx)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "sphinx.h" using namespace std; vector<int> find_colours(int N, vector<int> X, vector<int> Y){ vector <int> ans(n,0); int cur = 1; ans[0]=cur; for (int i=1; i<n; i++){ int target=4; if (i==1 || i==n){target=3;} vector <int> tm (n,n); tm[i]=-1; tm[i-1]=-1; ll found = perform_experiment(tm); if (found==target){ cur=1-cur; } ans[i]=cur; } return ans; }

Compilation message (stderr)

sphinx.cpp: In function 'std::vector<int> find_colours(int, std::vector<int>, std::vector<int>)':
sphinx.cpp:7:22: error: 'n' was not declared in this scope
    7 |     vector <int> ans(n,0);
      |                      ^
sphinx.cpp:18:9: error: 'll' was not declared in this scope
   18 |         ll found = perform_experiment(tm);
      |         ^~
sphinx.cpp:19:13: error: 'found' was not declared in this scope; did you mean 'round'?
   19 |         if (found==target){
      |             ^~~~~
      |             round