Submission #138871

#TimeUsernameProblemLanguageResultExecution timeMemory
138871dsjongScales (IOI15_scales)C++14
0 / 100
3 ms380 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; int ans[6]; void init(int T){ return; } void orderCoins() { int A=getLightest(1,2,3); int B=getLightest(4,5,6); int C; if(A==1) C=getLightest(A,B,2); else C=getLightest(A,B,1); ans[0]=C; vector<int>v; for(int i=1;i<=3;i++){ if(C!=i) v.push_back(i); } int X=getHeaviest(4,5,6); X=getHeaviest(X,v[0],v[1]); ans[5]=X; v.clear(); for(int i=1;i<=6;i++){ if(i!=X&&i!=A&&i!=B){ v.push_back(i); } } int Y=getHeaviest(v[0],v[1],v[2]); ans[4]=Y; int M,N; v.clear(); for(int i=1;i<=6;i++){ if(i!=X&&i!=Y&&i!=C){ v.push_back(i); } } ans[1]=getLightest(v[0],v[1],v[2]); ans[3]=getHeaviest(v[0],v[1],v[2]); for(int i=1;i<=6;i++){ if(i!=ans[1]&&i!=ans[3]&&i!=X&&i!=Y&&i!=C){ ans[2]=i; } } answer(ans); return; }

Compilation message (stderr)

scales.cpp: In function 'void init(int)':
scales.cpp:5:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T){
               ^
scales.cpp: In function 'void orderCoins()':
scales.cpp:30:6: warning: unused variable 'M' [-Wunused-variable]
  int M,N;
      ^
scales.cpp:30:8: warning: unused variable 'N' [-Wunused-variable]
  int M,N;
        ^
#Verdict Execution timeMemoryGrader output
Fetching results...