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