제출 #388892

#제출 시각아이디문제언어결과실행 시간메모리
388892MeGustaElArroz23저울 (IOI15_scales)C++14
45.45 / 100
1 ms208 KiB
#include<bits/stdc++.h> #include "scales.h" using namespace std; typedef vector<int> vi; void init(int T){ return;} void orderCoins(){ vi a={1,2,3},b={4,5,6}; vi sola(3),solb(3); sola[0]=getLightest(1,2,3); sola[1]=getMedian(1,2,3); if (sola[0]+sola[1]==4) sola[2]=2; else if (sola[0]+sola[1]==5) sola[2]=1; else sola[2]=3; solb[0]=getLightest(4,5,6); solb[1]=getMedian(4,5,6); if (solb[0]+solb[1]==9) solb[2]=6; else if (solb[0]+solb[1]==11) solb[2]=4; else solb[2]=5; int sol[6]; int aux=sola[2]; int i=0,j=0; while (i+j<4 and i<3 and j<3){ sol[i+j]=getLightest(sola[i],solb[j],aux); if (sol[i+j]==sola[i]) i++; else j++; if (i==2) aux=solb[2]; } if (i==3){ while (j<3){ sol[i+j]=solb[j]; j++; } } else if (j==3){ while (i<3){ sol[i+j]=sola[i]; i++; } } else{ sol[5]=getHeaviest(sola[0],sola[2],solb[2]); if (sol[5]==sola[2]) sol[4]=solb[2]; else sol[4]=sola[2]; } answer(sol); return; }

컴파일 시 표준 에러 (stderr) 메시지

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