| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 783758 | Lyrically | Scales (IOI15_scales) | C++17 | 1 ms | 212 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "scales.h"
using namespace std;
void init(int t){/*QwQ*/}
int QwQ_QwQ(int a,int b,int c,int d){
int x[3];
x[0]=a;
x[1]=b;
x[2]=c;
sort(x,x+3);
if(d<x[0]) return x[0];
if(d<x[1]) return x[1];
if(d<x[2]) return x[2];
return x[0];
}
void orderCoins(){
int a[6],q[6],qq=0;
q[0]=getNextLightest(1,2,3,4);
q[1]=getNextLightest(2,3,4,5);
q[2]=getNextLightest(3,4,5,6);
q[3]=getNextLightest(4,5,6,1);
q[4]=getNextLightest(5,6,1,2);
q[5]=getNextLightest(6,1,2,3);
for(int i=0;i<6;++i) qq=qq<<4|q[i];
iota(a,a+6,1);
do{
int now=0;
for(int i=0;i<6;++i) now=now<<4|QwQ_QwQ(a[i],a[(i+1)%6],a[(i+2)%6],a[(i+3)%6]);
if(now==qq){
answer(a);
return;
}
}while(next_permutation(a,a+6));
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
