# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167986 | HappyCapybara | Scales (IOI15_scales) | C++17 | 0 ms | 328 KiB |
#include "scales.h"
#include<bits/stdc++.h>
using namespace std;
void init(int T){
}
void orderCoins(){
int ans[6];
int a1 = getHeaviest(1, 2, 3);
int a2 = 1;
if (a1 == 1) a2 = 2;
int a3 = 2;
if (a1 == 2 || a2 == 2) a3 = 3;
int b3 = getLightest(4, 5, 6);
int b1 = 4;
if (b3 == 4) b1 = 5;
int b2 = 5;
if (b3 == 5 || b1 == 5) b2 = 6;
int r1 = getHeaviest(a2, a3, b3);
if (r1 == b3){
if (getLightest(a1, a2, a3) != a3) swap(a2, a3);
ans[0] = a3;
ans[1] = a2;
if (getHeaviest(b1, b2, b3) != b1) swap(b1, b2);
int r2 = getMedian(a1, b3, b2);
if (r2 == a1){
ans[2] = b3;
ans[3] = a1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |