Submission #520137

#TimeUsernameProblemLanguageResultExecution timeMemory
520137silverfishScales (IOI15_scales)C++14
20 / 100
1 ms332 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}; vector<int> lst = {0, 2, 3, 2, 1, 0, 2, 3}; for(int i : lst){ 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...