Submission #793532

#TimeUsernameProblemLanguageResultExecution timeMemory
793532MarkynoodleScales (IOI15_scales)C++17
0 / 100
1 ms304 KiB
#include "scales.h" #include<bits/stdc++.h> using namespace std; void init(int t){ return; } /* int getLightest(int a, int b, int c){return 0;} int getMedian(int a, int b, int c){return 0;} int getHeaviest(int a, int b, int c){return 0;} int getNextLightest(int a, int b, int c, int d){return 0;} */ void orderCoins(){ int one = getLightest(1, 2, 3); int two = getMedian(1, 2, 3); int three = 6 - one - two; int four = getLightest(4, 5, 6); int five = getMedian(4, 5, 6); int six = 15 - four - five; int ans[6] = {0,0,0,0,0,0}; int nextlight = getNextLightest(two, four, five, one); if(nextlight == two){ ans[0] = one; ans[1] = two; int med = getMedian(three, five, six); if(med == three){ ans[4] = three; ans[5] = six; ans[3] = five; ans[2] = four; } if(med == five){ int medd = getMedian(three, four, five); ans[2] = three; ans[3] = four; ans[4] = five; ans[5] = six; if(medd == three){ ans[2] = four; ans[3] = three; ans[4] = five; ans[5] = six; } } if(med == six){ ans[5] = three; ans[4] = six; ans[3] = five; ans[2] = four; } } if(nextlight == five){ ans[0] = four; ans[1] = one; ans[2] = five; int med = getMedian(two, three, six); if(med == two){ ans[3] = six; ans[4] = two; ans[5] = three; } if(med == three){ ans[3] = two; ans[4] = three; ans[5] = six; } if(med == six){ ans[3] = two; ans[4] = six; ans[5] = three; } } if(nextlight == four){ ans[0] = one; ans[1] = four; int low = getLightest(two, three, five); if(low == two){ ans[2] = two; int med = getMedian(three, five, six); if(med == three){ ans[3] = five; ans[4] = three; ans[5] = six; } if(med == five){ ans[3] = three; ans[4] = five; ans[5] = six; } if(med == six){ ans[3] = five; ans[4] = six; ans[5] = three; } } if(low == five){ ans[2] = five; int med = getMedian(two, three, six); if(med == two){ ans[3] = six; ans[4] = two; ans[5] = three; } if(med == three){ ans[3] = two; ans[4] = three; ans[5] = six; } if(med == six){ ans[3] = two; ans[4] = six; ans[5] = three; } } } answer(ans); }

Compilation message (stderr)

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