# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
484753 | imachug | Scales (IOI15_scales) | C++17 | 1 ms | 292 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;
void init(int T) {
/* ... */
}
void orderCoins() {
int max1 = getHeaviest(1, 2, 3);
int max2 = getHeaviest(4, 5, 6);
int max3 = max1 == 1 ? 2 : 1;
int max = getHeaviest(max1, max2, max3);
int W[] = {1, 2, 3, 4, 5, 6};
swap(W[5], W[max - 1]);
sort(W, W + 5, [&](int i, int j) {
return getLightest(i, j, max) == i;
});
answer(W);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |