# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
765747 | boyliguanhan | Scales (IOI15_scales) | C++17 | 1 ms | 212 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<algorithm>
#define x(b,c) if(X==c) std::swap(b,c);
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 X=getLightest(a,d,e);
x(a,d)
x(a,e)
X=getHeaviest(f,b,c);
x(f,b)
x(f,c)
X=getLightest(b,c,d);
x(b,c)
x(b,d)
X=getLightest(b,d,e);
x(b,e)
X=getHeaviest(c,d,e);
x(e,c)
x(e,d)
X=getLightest(c,d,e);
x(c,d);
int w[]={a,b,c,d,e,f};
answer(w);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |