제출 #1165200

#제출 시각아이디문제언어결과실행 시간메모리
1165200SmuggingSpunScales (IOI15_scales)C++20
45.45 / 100
0 ms328 KiB
#include<bits/stdc++.h> #include "scales.h" using namespace std; void init(int T){ } int W_ans[6]; void answer(vector<int>& ans){ for(int i = 0; i < 6; i++){ W_ans[i] = ans[i]; } answer(W_ans); } void orderCoins(){ vector<int>p = {1, 2, 3, 4, 5, 6}, ans; while(p.size() > 2){ int light = p[0]; for(int i = 1; i < p.size(); i += 2){ if(i + 1 == p.size()){ light = getLightest(light, p[i], p[light == p[0]]); } else{ light = getLightest(p[i], p[i + 1], light); } } ans.emplace_back(light); p.erase(find(p.begin(), p.end(), light)); } int heavy = getHeaviest(p[0], p[1], ans[0]); ans.emplace_back(p[0] ^ p[1] ^ heavy); ans.emplace_back(heavy); answer(ans); }
#Verdict Execution timeMemoryGrader output
Fetching results...