Submission #619795

#TimeUsernameProblemLanguageResultExecution timeMemory
619795someoneScales (IOI15_scales)C++14
45.45 / 100
1 ms340 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; void init(int T) { } void orderCoins() { int ans[6]; for(int i = 0; i < 6; i++) ans[i] = i+1; for(int i = 0; i < 4; i++) { for(int j = i; j < 5; j += 2) { if(j == 4) { int lightest = getLightest(ans[i], ans[j], ans[j+1]); if(lightest == ans[j+1]) swap(ans[j+1], ans[i]); } else { int lightest = getLightest(ans[i], ans[j+1], ans[j+2]); if(lightest == ans[j+1]) swap(ans[j+1], ans[i]); else if(lightest == ans[j+2]) swap(ans[j+2], ans[i]); } } } if(getHeaviest(ans[0], ans[4], ans[5]) == ans[4]) swap(ans[4], ans[5]); 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...