# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
118964 | oolimry | Scales (IOI15_scales) | C++14 | 3 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;
void init(int T) {
/* ... */
}
void orderCoins() {
/* ... */
int W[] = {1, 2, 3, 4, 5, 6};
W[0] = getLightest(1,2,3);
W[1] = getLightest(4,5,6);
int smth = 1;
if(W[0] == 1 || W[1] == 1) smth = 2;
if(W[0] == 2 || W[1] == 2) smth = 3;
if(getLightest(W[0],W[1],smth) == W[1]) swap(W[0],W[1]);
W[4] = getHeaviest(1,2,3);
W[5] = getHeaviest(4,5,6);
smth = W[0];
if(getHeaviest(W[4],W[5],smth) == W[1]) swap(W[4],W[5]);
set<int> s = {W[0],W[1],W[4],W[5]};
int a = -1, b = -1;
for(int i = 1;i <= 6;i++){
if(s.find(i) == s.end()){
if(a == -1) a = i;
else b = i;
}
}
W[2] = getLightest(a,b,W[5]);
if(W[2] == a) W[3] = b;
else W[3] = a;
answer(W);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |