이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define fr(i, n, m) for(int i = (n); i <= (m); i ++)
#define st first
#define nd second
#define pb push_back
#define pq priority_queue
#define all(x) begin(x), end(x)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#include "art.h"
/*
void answer(vector<int> v){
	for(auto u : v) cout<<u <<' ';
	cout<<endl;
}
long long publish(vector<int> v){
	for(auto u : v) cout<<u <<' ';
	cout<<endl;
	long long c;
	cin >> c;
	return c;
}
*/
void solve(int N){
	vector<int> v;
	fr(i, 1, N){
		v.pb(i);
	}
	vector<int> ans(N);
	fr(i, 0, N-1) ans[i] = N;
	
	long long XpA = publish(v);
	long long ApB = N-1;
	fr(i, 0, N-2){
		v.pb(v[0]);
		v.erase(v.begin());
		
		long long XpB = publish(v);
		int pos = (XpA-XpB + ApB)/2;
		
		XpA = XpB;
		ans[pos] = v.back();
	}
	answer(ans);
}/*
int main(){
	solve(3);
}*/
컴파일 시 표준 에러 (stderr) 메시지
interface.cpp: In function 'int publish(std::vector<int>)':
interface.cpp:20:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   20 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~
interface.cpp: In function 'void answer(std::vector<int>)':
interface.cpp:36:17: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   36 |     if(v.size() != N) {
      |        ~~~~~~~~~^~~~| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |