Submission #589978

#TimeUsernameProblemLanguageResultExecution timeMemory
589978yutabiScales (IOI15_scales)C++14
45.45 / 100
1 ms308 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; void init(int T) { /* ... */ } void aaa(int W[], int b) { int res=getLightest(W[b],W[b-1],W[b-2]); if(W[b]==res) { swap(W[b],W[b-1]); } if(W[b-1]==res) { swap(W[b-2],W[b-1]); } } void orderCoins() { int W[] = {1, 2, 3, 4, 6, 5}; aaa(W,5); aaa(W,3); aaa(W,2); aaa(W,5); aaa(W,3); aaa(W,5); aaa(W,4); aaa(W,5); if(getHeaviest(W[4],W[5],W[0])!=W[5]) { swap(W[4],W[5]); } answer(W); }

Compilation message (stderr)

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