Submission #786495

#TimeUsernameProblemLanguageResultExecution timeMemory
786495vnm06Scales (IOI15_scales)C++14
0 / 100
1 ms468 KiB
#include "scales.h" #include<bits/stdc++.h> using namespace std; void init(int T) { /* ... */ } void orderCoins() { /* ... */ int W[6] = {1, 2, 3, 4, 5, 6}; int sm1=getLightest(1, 2, 3); int sm2=getLightest(4, 5, 6); int t=sm1+1; if(t==sm2) t++; W[0]=getLightest(sm1, sm2, t); if(W[0]==sm1) W[1]=getLightest(sm2, sm1%3+1, (sm1+1)%3+1); else W[1]=getLightest(sm1, sm2%3+4, (sm2+1)%3+5); vector<int> vr; for(int i=1; i<=6; i++) if(W[0]!=i && W[1]!=i) vr.push_back(i); W[2]=getLightest(getLightest(vr[0], vr[1], vr[2]), vr[2], vr[3]); for(int i=0; i<3; i++) if(vr[i]==W[2]) swap(vr[i], vr[3]); W[3]=getLightest(vr[0], vr[1], vr[2]); W[5]=getHeaviest(vr[0], vr[1], vr[2]); W[4]=21-W[0]-W[1]-W[2]-W[3]-W[5]; answer(W); }

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) {
      |           ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...