제출 #1312087

#제출 시각아이디문제언어결과실행 시간메모리
1312087eri16스핑크스 (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);

    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;
}    

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