# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
520085 | pisikaka | Scales (IOI15_scales) | C++17 | 1 ms | 336 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) {
return;
}
void orderCoins() {
int w[] = {1, 2, 3, 4, 5, 6}, ans[6];
for(int k = 0; k < 4; ++k){
for(int i = 0; i < 4; ++i){
int v = getLightest(w[i], w[i+1], w[i+2]);
for(int j = i; j <= i+2; ++j) if(v == w[j]) swap(w[i], w[j]);
v = getMedian(w[i], w[i+1], w[i+2]);
for(int j = i; j <= i+2; ++j) if(v == w[j]) swap(w[i], w[j]);
}
}
answer(w);
return;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |