| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 800718 | firewater | Scales (IOI15_scales) | C++14 | 1 ms | 468 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "scales.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#define ll long long
using namespace std;
// int getHeaviest(int A, int B, int C) 
// int getMedian(int A, int B, int C) 
// int getLightest(int A, int B, int C) 
// int getNextLightest(int A, int B, int C, int D) 
#define N 100
int w,x,y,a[N],p[N],sav,ans[6];
void init(int T) {
    /* ... */
}
void orderCoins() {
    /* ... */
    x=0;y=2;
    ans[x]=y;
    for(int i=1;i<=6;++i)p[i]=0;
    p[y]=1;
    for(int i=1;i<=5;++i){
        w=0;
        for(int j=1;j<=6;++j)
            if(!p[j])a[++w]=j;
        sav=a[1];
        for(int j=2;j<=w;++j)
            sav=getMedian(ans[0],sav,a[j]);
        ans[i]=sav;
        p[sav]=1;
    }
    answer(ans);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
