Submission #301756

#TimeUsernameProblemLanguageResultExecution timeMemory
301756square1001Scales (IOI15_scales)C++14
26.32 / 100
1 ms384 KiB
#include "scales.h"
#include <vector>
using namespace std;
void init(int T) {
    /* ... */
}
void orderCoins() {
	int LA = getLightest(1, 2, 3);
	int LB = getLightest(4, 5, 6);
	int LC = getLightest(LA, LB, LA == 1 ? 2 : 1);
	vector<int> rank(6, 1);
	rank[LC - 1] = 0;
	for(int i = 1; i <= 6; ++i) {
		for(int j = 1; j < i; ++j) {
			if(i != LC && j != LC) {
				int res = getHeaviest(i, j, LC);
				++rank[res - 1];
			}
		}
	}
	vector<int> iperm(6);
	for(int i = 0; i < 6; ++i) {
		iperm[rank[i]] = i + 1;
	}
	int W[6] = {iperm[0], iperm[1], iperm[2], iperm[3], iperm[4], iperm[5]};
	answer(W);
}

Compilation message (stderr)

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