Submission #484753

#TimeUsernameProblemLanguageResultExecution timeMemory
484753imachugScales (IOI15_scales)C++17
19.61 / 100
1 ms292 KiB
#include "scales.h"

#include <bits/stdc++.h>

using namespace std;


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


void orderCoins() {
	int max1 = getHeaviest(1, 2, 3);
	int max2 = getHeaviest(4, 5, 6);
	int max3 = max1 == 1 ? 2 : 1;
	int max = getHeaviest(max1, max2, max3);

	int W[] = {1, 2, 3, 4, 5, 6};
	swap(W[5], W[max - 1]);

	sort(W, W + 5, [&](int i, int j) {
		return getLightest(i, j, max) == i;
	});

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