제출 #209399

#제출 시각아이디문제언어결과실행 시간메모리
209399autumn_eel저울 (IOI15_scales)C++14
55.56 / 100
5 ms376 KiB
#include "scales.h" #include <bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; void init(int T) { /* ... */ } void orderCoins() { random_device rnd; vector<int>v{1,2,3,4,5,6}; shuffle(v.begin(),v.end(),rnd); int A=getLightest(v[0],v[1],v[2]),B=getMedian(v[0],v[1],v[2]),C=v[0]+v[1]+v[2]-A-B; int D=getLightest(v[3],v[4],v[5]),E=getMedian(v[3],v[4],v[5]),F=v[3]+v[4]+v[5]-D-E; int nD,nE,nF; if(getHeaviest(B,C,F)!=C){ swap(A,D);swap(B,E);swap(C,F); } nD=getNextLightest(A,B,C,D); nE=getNextLightest(A,B,C,E); nF=getNextLightest(A,B,C,F); int As[]{A,B,C},Ds[]{D,E,F},nDs[]{nD,nE,nF}; int s=0; vector<int>ans; rep(i,3){ while(s<3&&nDs[s]==As[i])ans.push_back(Ds[s++]); ans.push_back(As[i]); } while(s<3)ans.push_back(Ds[s++]); int W[6]{}; rep(i,6)W[i]=ans[i]; answer(W); }

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

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