# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1156109 | aarb_.tomatexd | Scales (IOI15_scales) | C++20 | 0 ms | 320 KiB |
#include <bits/stdc++.h>
#include "scales.h"
using namespace std;
void init(int t) {}
void orderCoins() {
int A = getMedian(1, 2, 3);
int B = getMedian(4, 5, 6);
int X = (A == 1 ? 2 : 1);
int C = getNextLightest(X, 4, 5, A);
int Y = (B == 4 ? 5 : 4);
int Z;
vector<int> g2 = {4, 5, 6};
for (int coin : g2)
if (coin != B && coin != Y) { Z = coin; break; }
int R;
vector<int> g1 = {1, 2, 3};
for (int coin : g1)
if (coin != A && coin != X) { R = coin; break; }
int paramQ4 = (3 == A || 3 == X ? R : 3);
int D = getNextLightest(Y, Z, paramQ4, B);
int R2;
for (int coin : g1)
if (coin != A && coin != X && coin != paramQ4) { R2 = coin; break; }
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |