제출 #1172251

#제출 시각아이디문제언어결과실행 시간메모리
1172251sasdeArt Collections (BOI22_art)C++20
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> #include "art.h" #define emb emplace_back using namespace std; void solve(int N){ int n=N; vector<int>ans(n),ans1; for(int i=1;i<=n;++i){ vector<int>l; for(int j=1;j<=n;++j){ l.emb(((j+i)%n-1+n)%n); } ans1.emb(res); } for(int i=0;i<ans1.size();++i){ int res=(ans1[i]+n-1)/2+1; ans[res-1]=i+1; } answer(ans); }

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

art.cpp: In function 'void solve(int)':
art.cpp:15:12: error: 'res' was not declared in this scope
   15 |   ans1.emb(res);
      |            ^~~