# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1017177 | huutuan | 저울 (IOI15_scales) | C++14 | 1 ms | 348 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;
void init(int T) {
}
int ans[6];
void orderCoins() {
vector<int> v{1, 2, 3, 4, 5, 6}, v2;
int t1=getLightest(1, 2, 3);
int t2=getLightest(4, 5, 6);
int tt=getLightest(t1==1?2:1, t1, t2);
ans[0]=tt;
v.erase(find(v.begin(), v.end(), tt));
{
int t=0;
if (tt<=3) t=getLightest(t2, v[0], v[1]);
else t=getLightest(t1, v[3], v[4]);
v2.push_back(t);
ans[1]=t;
v.erase(find(v.begin(), v.end(), t));
}
{
int t=getLightest(v[0], v[1], v[2]);
t=getLightest(t, t==v[2]?v[1]:v[2], v[3]);
v2.push_back(t);
ans[2]=t;
v.erase(find(v.begin(), v.end(), t));
}
{
int t=getLightest(v[0], v[1], v[2]);
v2.push_back(t);
ans[3]=t;
v.erase(find(v.begin(), v.end(), t));
}
{
int t=getMedian(v[0], v[1], v2[0]);
ans[4]=t;
ans[5]=(v[0]^v[1]^t);
}
answer(ans);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |