# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
358228 | juggernaut | Scales (IOI15_scales) | C++14 | 1 ms | 364 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include"scales.h"
#include"bits/stdc++.h"
#ifndef EVAL
#include"grader.cpp"
#endif
using namespace std;
void init(int T){}
void orderCoins(){
int a=getLightest(1,2,3);
int f=getHeaviest(4,5,6);
int b=1+(a<=1),c=2+(a<=2);
int d=4+(f<=4),e=5+(f<=5);
int aa=getLightest(a,d,e);
int ff=getHeaviest(f,b,c);
if(aa==d)swap(a,d);
if(aa==e)swap(a,e);
if(ff==b)swap(f,b);
if(ff==c)swap(f,c);
int bb=getLightest(b,c,d);
if(bb==c)swap(b,c);
if(bb==d)swap(b,d);
bb=getLightest(b,d,e);
if(bb==e)swap(b,e);
int ee=getHeaviest(c,d,e);
if(ee==c)swap(e,c);
if(ee==d)swap(e,d);
int cc=getLightest(c,d,e);
if(cc==d)swap(c,d);
int W[]={a,b,c,d,e,f};
answer(W);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |