Submission #520088

#TimeUsernameProblemLanguageResultExecution timeMemory
520088pisikakaScales (IOI15_scales)C++17
12.20 / 100
1 ms204 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; void init(int T) { return; } void orderCoins() { int w[] = {1, 2, 3, 4, 5, 6}; for(int k = 0; k < 3; ++k){ for(int i = 0; i < 4; ++i){ int v = getLightest(w[i], w[i+1], w[i+2]); for(int j = i; j <= i+2; ++j) if(v == w[j]) swap(w[i], w[j]); v = getMedian(w[i], w[i+1], w[i+2]); for(int j = i; j <= i+2; ++j) if(v == w[j]) swap(w[i+1], w[j]); } } answer(w); return; }

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...