Submission #596871

#TimeUsernameProblemLanguageResultExecution timeMemory
596871PiejanVDCScales (IOI15_scales)C++17
20 / 100
1 ms332 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; void init(int t) { } void orderCoins() { int ans[6] = {1, 2, 3, 4, 5, 6}; for(int t = 0 ; t < 3 ; t++) { for(int i = 0 ; i < 4 ; i++) { int a = getLightest(ans[i], ans[i+1], ans[i+2]); if(ans[i+1] == a) swap(ans[i], ans[i+1]); if(ans[i+2] == a) swap(ans[i], ans[i+2]); } int b = getHeaviest(ans[3], ans[4], ans[5]); if(ans[3] == b) swap(ans[3], ans[5]); if(ans[4] == b) swap(ans[4], ans[5]); } int i = 0; int a = getLightest(ans[i], ans[i+1], ans[i+2]); if(ans[i+1] == a) swap(ans[i], ans[i+1]); if(ans[i+2] == a) swap(ans[i], ans[i+2]); answer(ans); }

Compilation message (stderr)

scales.cpp: In function 'void init(int)':
scales.cpp:5:15: warning: unused parameter 't' [-Wunused-parameter]
    5 | void init(int t) {
      |           ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...