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