제출 #1312082

#제출 시각아이디문제언어결과실행 시간메모리
1312082eri16스핑크스 (IOI24_sphinx)C++20
컴파일 에러
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); for (int i=0; i<n; i++){ for (int j=0; j<n; j++){ vector <int> sub (n,j); sub[i]=-1; int a = perform_experiment(sub); if (a==1){ans[i]=j;} } } return ans; }

컴파일 시 표준 에러 (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);
      |                      ^