# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1017169 | huutuan | 저울 (IOI15_scales) | C++14 | 1 ms | 604 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;
while ((int)v.size()>=3){
int t=getLightest(v[0], v[1], v[2]);
for (int i=(int)v.size()-1; i>=3; i-=2){
if (i!=3) t=getLightest(t, v[i], v[i-1]);
else t=getLightest(t, v[3], t^v[2]^v[1]);
}
v2.push_back(t);
ans[t-1]=(int)v2.size();
v.erase(find(v.begin(), v.end(), t));
}
int t=getMedian(v[0], v[1], v2[0]);
ans[t-1]=5;
ans[(v[0]^v[1]^t)-1]=6;
answer(ans);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |