Submission #619828

#TimeUsernameProblemLanguageResultExecution timeMemory
619828yanndevScales (IOI15_scales)C++17
7.40 / 100
1 ms212 KiB
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;

void init(int T) {
    /* ... */
}

bool comp(int a, int b) {
    int c = -1;
    for (int i = 1; i <= 6; i++)
        if (i != a && i != b)
            c = i;
    
    int small = getLightest(a, b, c);
    int big = getHeaviest(a, b, c);

    if (b == big || a == small)
        return true;
    if (b == small || a == big)
        return false;
    return false;
}

void orderCoins() {
    /* ... */
    int W[] = {1, 2, 3, 4, 5, 6};
    sort(W, W + 6, comp);
    answer(W);
}

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