Submission #793521

#TimeUsernameProblemLanguageResultExecution timeMemory
793521MarkynoodleScales (IOI15_scales)C++17
Compilation error
0 ms0 KiB
#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:5:15: warning: unused parameter 't' [-Wunused-parameter]
    5 | void init(int t){
      |           ~~~~^
scales.cpp: In function 'void ordercoins()':
scales.cpp:15:15: error: 'getLightest' was not declared in this scope
   15 |     int one = getLightest(1, 2, 3);
      |               ^~~~~~~~~~~
scales.cpp:16:15: error: 'getMedian' was not declared in this scope
   16 |     int two = getMedian(1, 2, 3);
      |               ^~~~~~~~~
scales.cpp:23:21: error: 'getNextLightest' was not declared in this scope
   23 |     int nextlight = getNextLightest(two, four, five, one);
      |                     ^~~~~~~~~~~~~~~
scales.cpp:118:5: error: 'answer' was not declared in this scope
  118 |     answer(ans);
      |     ^~~~~~