Submission #1084869

#TimeUsernameProblemLanguageResultExecution timeMemory
1084869the_coding_poohScales (IOI15_scales)C++14
45.45 / 100
1 ms436 KiB
#include "scales.h" #include <bits/stdc++.h> #define uwu return; using namespace std; #define getH getHeaviest #define getL getLightest #define getM getMedian #define getNL getNextLightest #define bg s.begin() #define ed s.end() void init(int T) { uwu } void orderCoins() { int W[] = {0, 0, 0, 0, 0, 0}; vector <int> s; for(int i = 1; i <= 6; i++){ s.push_back(i); } int a = getL(1, 2, getL(3, 4, 5)); W[0] = getL(a, (a != 5 ? a + 1 : a - 1), 6); s.erase(lower_bound(bg, ed, W[0])); W[1] = getL(s[0], s[1], getL(s[2], s[3], s[4])); s.erase(lower_bound(bg, ed, W[1])); W[2] = getM(W[1], getL(s[0], s[1], s[2]), s[3]); s.erase(lower_bound(bg, ed, W[2])); W[3] = getL(s[0], s[1], s[2]); s.erase(lower_bound(bg, ed, W[3])); W[4] = getM(s[0], s[1], W[3]); s.erase(lower_bound(bg, ed, W[4])); W[5] = s[0]; answer(W); }

Compilation message (stderr)

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