# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1084901 | the_coding_pooh | Scales (IOI15_scales) | C++14 | 1 ms | 604 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 uwu return;
using namespace std;
#define getH getHeaviest
#define getL getLightest
#define getM getMedian
#define getNL getNextLightest
#define bg s.begin()
#define ed s.end()
void init(int T) {
uwu
}
void orderCoins() {
int W[] = {0, 0, 0, 0, 0, 0};
vector <int> s;
for(int i = 1; i <= 6; i++){
s.push_back(i);
}
int a = getL(1, 2, getL(3, 4, 5));
W[0] = getL(a, (a != 5 ? a + 1 : a - 1), 6);
s.erase(lower_bound(bg, ed, W[0]));
W[1] = getL(s[0], s[1], getL(s[2], s[3], s[4]));
s.erase(lower_bound(bg, ed, W[1]));
W[2] = getM(W[1], getL(s[0], s[1], s[2]), s[3]);
s.erase(lower_bound(bg, ed, W[2]));
W[3] = getL(s[0], s[1], s[2]);
s.erase(lower_bound(bg, ed, W[3]));
W[4] = getM(s[0], s[1], W[3]);
s.erase(lower_bound(bg, ed, W[4]));
W[5] = s[0];
answer(W);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |