# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
49873 | imeimi2000 | Scales (IOI15_scales) | C++17 | 21 ms | 944 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 <algorithm>
#include <vector>
using namespace std;
struct _qs {
int i, a, b, c, d;
int query() const {
if (i == 1) return getHeaviest(a + 1, b + 1, c + 1) - 1;
if (i == 2) return getLightest(a + 1, b + 1, c + 1) - 1;
if (i == 3) return getMedian(a + 1, b + 1, c + 1) - 1;
return getNextLightest(a + 1, b + 1, c + 1, d + 1) - 1;
}
int queryIdx() const {
int x = query();
if (x == a) return 1;
if (x == b) return 2;
return 3;
}
} qs[120];
struct arr {
int x[6];
int query1(int a, int b, int c) const {
int t = a;
if (x[t] < x[b]) t = b;
if (x[t] < x[c]) t = c;
return t;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |