Submission #1285267

#TimeUsernameProblemLanguageResultExecution timeMemory
1285267AndriaBeridzeScales (IOI15_scales)C++20
0 / 100
1 ms332 KiB
#include <bits/stdc++.h> #include "scales.h" using namespace std; void orderCoins() { int p[6] = {1, 2, 3, 4, 5, 6}; for (int i = 0; i < 6; i++) { for (int j = 0; j < 4; j++) { int a = getLightest(p[j], p[j + 1], p[j + 2]); int b = getMedian(p[j], p[j + 1], p[j + 2]); int c = p[j] + p[j + 1] + p[j + 2] - a - b; // cout << a << ' ' << b << ' ' << c << endl; p[j] = a; p[j + 1] = b; p[j + 2] = c; } } answer(p); } void init(int T) { while (T--) { orderCoins(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...