| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1157144 | the_ZHER | Art Collections (BOI22_art) | C++20 | 0 ms | 408 KiB |
#include <bits/stdc++.h>
#include "art.h"
using namespace std;
void solve(int N){
vector<int>ans;
int pos[5000];
for(int i=1;i<=N;i++){
ans.push_back(i);
pos[i]=i-1;
}
int was[5000];
for(int i=1;i<=N;i++){
for(int j=1;j<=N;j++){
if(was[j]==1){
continue;
}
pos[ans[0]]=ans[j];
swap(ans[pos[j]],ans[0]);
pos[j]=0;
int x=publish(ans);
if(x==N-i){
was[j]=1;
pos[ans[0]]=N-i;
pos[ans[N-i]]=0;
swap(ans[0],ans[N-i]);
break;
}
}
}
answer(ans);
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
