# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
136999 | arthurconmy | 저울 (IOI15_scales) | C++14 | 2 ms | 380 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#ifndef ARTHUR_LOCAL
#include "scales.h"
#endif
int t;
void init(int T)
{
t=T;
}
void orderCoins()
{
vector<int> cur = {1,2,3,4,5,6};
vector<int> ans;
for(int dot=1; dot<=4; dot++)
{
int cur_min = getLightest(cur[0],cur[1],cur[2]);
int not_min=-1;
if(cur_min==cur[0]) not_min=cur[1];
else not_min=cur[0];
if(dot<4)
{
int add_on = not_min;
if(dot<3) add_on=cur[4];
cur_min=getLightest(cur_min,cur[3],add_on);
}
if(dot==1)
{
cur_min = getLightest(cur_min,not_min,cur[5]);
}
ans.push_back(cur_min);
vector<int> new_cur;
for(auto c:cur)
{
if(c!=cur_min) new_cur.push_back(c);
}
cur=new_cur;
}
ans.push_back(getMedian(ans.back(),cur[0],cur[1]));
ans.push_back(cur[0]+cur[1]-ans.back());
// for(auto a:ans) cout << a << " ";
int A[6];
for(int i=0; i<6; i++) A[i]=ans[i];
answer(A);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |