Submission #55993

#TimeUsernameProblemLanguageResultExecution timeMemory
55993aomeScales (IOI15_scales)C++17
0 / 100
4 ms792 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; void init(int T) { } int p[10]; void orderCoins() { p[1] = getLightest(1, 2, 3); p[3] = getHeaviest(1, 2, 3); p[2] = 6 - p[1] - p[3]; p[4] = getLightest(4, 5, 6); p[6] = getHeaviest(4, 5, 6); p[5] = 15 - p[4] - p[6]; int v0 = getNextLightest(p[2], p[4], p[6], p[1]); if (v0 == p[2]) { int v1 = getMedian(p[3], p[4], p[6]); if (v1 == p[6]) { int v2 = getLightest(p[1], p[4], p[6]); if (v2 == p[1]) { int res[] = {p[1], p[2], p[4], p[5], p[6], p[3]}; answer(res); return; } else { int res[] = {p[4], p[5], p[6], p[1], p[2], p[3]}; answer(res); return; } } if (v1 == p[4]) { int res[] = {p[1], p[2], p[3], p[4], p[5], p[6]}; answer(res); return; } if (v1 == p[3]) { int v2 = getNextLightest(p[1], p[2], p[3], p[5]); if (v2 == p[3]) { int res[] = {p[1], p[2], p[4], p[5], p[3], p[6]}; answer(res); return; } else { int res[] = {p[1], p[2], p[4], p[3], p[5], p[6]}; answer(res); return; } } } if (v0 == p[6]) { int v1 = getNextLightest(p[1], p[2], p[3], p[5]); if (v1 == p[1]) { int res[] = {p[4], p[5], p[1], p[6], p[2], p[3]}; answer(res); return; } else { int res[] = {p[4], p[1], p[5], p[6], p[2], p[3]}; answer(res); return; } } if (v0 == p[4]) { int v1 = getNextLightest(p[1], p[2], p[3], p[5]); int v2 = getNextLightest(p[1], p[2], p[3], p[6]); if (v1 == p[2] && v2 == p[2]) { int res[] = {p[1], p[4], p[5], p[6], p[2], p[3]}; answer(res); return; } if (v1 == p[2] && v2 == p[3]) { int res[] = {p[1], p[4], p[5], p[2], p[6], p[3]}; answer(res); return; } if (v1 == p[2] && v2 == p[1]) { int res[] = {p[1], p[4], p[5], p[2], p[3], p[6]}; answer(res); return; } if (v1 == p[3] && v2 == p[3]) { int res[] = {p[1], p[4], p[2], p[5], p[6], p[3]}; answer(res); return; } if (v1 == p[3] && v2 == p[1]) { int res[] = {p[1], p[4], p[2], p[5], p[3], p[6]}; answer(res); return; } if (v1 == p[1] && v2 == p[1]) { int res[] = {p[1], p[4], p[2], p[3], p[5], p[6]}; answer(res); return; } } }

Compilation message (stderr)

In file included from grader.c:2:0:
graderlib.c: In function 'void answer(int*)':
graderlib.c:53:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (_ghksjhdfkae19ga_ > 1) 
     ^~
graderlib.c:56:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  for (i = 0; i < 6; i++) {
  ^~~
scales.cpp: In function 'void init(int)':
scales.cpp:7:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T) {
               ^
#Verdict Execution timeMemoryGrader output
Fetching results...