# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
132418 | 2019-07-18T19:47:40 Z | reda | Scales (IOI15_scales) | C++14 | 0 ms | 0 KB |
#include<bits/stdc++.h> #include "scales.h" using namespace std; void init(int T) { return; } bool cmp(int x,int y) { for(int i=1;i<=3;i++) { if(x==i||y==i)continue; int ans=getLightest(x,y,i); if(ans==i) ans=getHeaviest(x,y,i),return (ans==y); else return (ans==x); } } void orderCoins() { int w[6]={1,2,3,4,5,6}; sort(w,w+6,cmp); answer(w); return; }