# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
133795 | Runtime_error_ | Scales (IOI15_scales) | C++14 | 2 ms | 504 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>
using namespace std;
int mn = 1;
void init(int T) {
}
bool cmp(int x,int y){
int tmp = getHeaviest(mn,x,y);
return (tmp == y);
}
void orderCoins() {
int W[] = {1, 2, 3, 4, 5, 6};
int x = getLightest(1,2,3) , y = getLightest(4,5,6),z;
for(int i=1;i<=6;i++)
if(i != x && i != y)
z = i;
mn = getLightest( x,y,z );
for(int i=1;i<6;i++)
if(W[i] == mn)
swap(W[i],W[0]);
sort(W+1,W+6,cmp);
answer(W);
return ;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |