| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 896335 | LCJLY | Art Collections (BOI22_art) | C++17 | 1187 ms | 1760 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
//solve function
void solve(int n) {
//std::vector<int> order = {1, 2, 3};
//publish(order);
//order = {2, 3, 1};
//publish(order);
//order = {1, 3, 2};
//answer(order);
deque<int>d;
vector<int>storage;
for(int x=1;x<=n;x++){
d.push_back(x);
storage.push_back(x);
}
int ans[n+5];
memset(ans,-1,sizeof(ans));
int last=publish(storage);
for(int x=1;x<n;x++){
vector<int>cur;
d.push_front(d.back());
d.pop_back();
for(auto it:d){
cur.push_back(it);
}
int hold=publish(cur);
//show2(last,last,hold,hold);
int index=1+(n-1-(last-hold))/2;
//show(index,index);
ans[index]=d.front();
last=hold;
}
vector<int>amos;
for(int x=1;x<=n;x++){
if(ans[x]==-1){
amos.push_back(d.back());
}
else{
amos.push_back(ans[x]);
}
}
answer(amos);
}컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
