# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
778056 | Jarif_Rahman | Scales (IOI15_scales) | C++17 | 1 ms | 300 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>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
void init(int T){
}
void orderCoins(){
int w[6] = {1, 2, 3, 4, 5, 6};
/* determine heaviest */{
int a = getHeaviest(1, 2, 3), b = getHeaviest(4, 5, 6);
int c = 1;
if(c == a) c = 2;
int d = getHeaviest(a, b, c);
if(d != 6) swap(w[d-1], w[5]);
}
sort(w, w+5, [&](int a, int b){
return getLightest(a, b, w[5]) == a;
});
answer(w);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |