제출 #1256699

#제출 시각아이디문제언어결과실행 시간메모리
1256699minhpkArt Collections (BOI22_art)C++20
컴파일 에러
0 ms0 KiB
#include "art.h" #include <bits/stdc++.h> using namespace std; void solve(int n){ pair<int,int> res[1000005]; vector<pair<int,int>> pre; vector <int> ans(n); for (int i=1;i<=a;i++){ vector <int> query; query.push_back(i); for (int j=1;j<=a;j++){ if (i==j){ continue; } query.push_back(j); } int sl=publish(query); pre.push_back({sl,i}); } sort(pre.begin(),pre.end()); for (int i=0;i<n;i++){ int pos=n-i-1; ans[i]=pre[i].second; } answer(ans); }

컴파일 시 표준 에러 (stderr) 메시지

art.cpp: In function 'void solve(int)':
art.cpp:11:21: error: 'a' was not declared in this scope
   11 |     for (int i=1;i<=a;i++){
      |                     ^