# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
760878 | Ahmed57 | 저울 (IOI15_scales) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
void init(int T){
return ;
}
//int ww[7];
int getHeaviest(int A, int B, int C);
int getLightest(int A, int B, int C);
int getMedian(int A, int B, int C);
int getNextLightest(int A, int B, int C, int D);
void answer(int W[6]);
void orderCoins(){
vector<int> rem;
int ans[6] = {0};
for(int i = 1;i<=6;i++)rem.push_back(i);
int x = getLightest(rem[0],rem[1],rem[2]);
int y = getLightest(rem[3],rem[4],rem[5]);
int z = getLightest(x,y,rem[rem.size()-1]);
ans[0] = z;
auto it = lower_bound(rem.begin(),rem.end(),z);
rem.erase(it);
x = getLightest(rem[0],rem[1],rem[2]);
y = getLightest(rem[2],rem[3],rem[4]);
z = getLightest(x,y,rem[rem.size()-1]);
ans[1] = z;
it = lower_bound(rem.begin(),rem.end(),z);
rem.erase(it);
x = getLightest(rem[0],rem[1],rem[2]);
y = getLightest(rem[1],rem[2],rem[3]);
z = getLightest(x,y,rem[rem.size()-1]);
ans[2] = z;
it = lower_bound(rem.begin(),rem.end(),z);
rem.erase(it);
z = getLightest(rem[0],rem[1],rem[2]);
ans[3] = z;
it = lower_bound(rem.begin(),rem.end(),z);
rem.erase(it);
z = getMedian(rem[0],rem[1],z);
ans[4] = z;
it = lower_bound(rem.begin(),rem.end(),z);
rem.erase(it);
ans[5] = rem[0];
answer(ans);
return ;
}
/*
int main(){
ww[1] = 2 , ww[2] = 1, ww[3] = 3 , ww[4] = 4, ww[5] =5 , ww[6] = 6;
orderCoins();
}*/