Submission #596867

#TimeUsernameProblemLanguageResultExecution timeMemory
596867PiejanVDCScales (IOI15_scales)C++17
0 / 100
1 ms340 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 < 1 ; 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]);
    }

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