Submission #1276959

#TimeUsernameProblemLanguageResultExecution timeMemory
1276959papaulo저울 (IOI15_scales)C++20
45.45 / 100
1 ms356 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; void init(int T) { } void orderCoins() { int W[6]; vector<int> vec; for(int i=1;i<=6;i++) vec.push_back(i); for(int i=0;i<4;i++) { int c=vec[0]; for(int j=1;j<vec.size();j+=2) { int s=j+1; if(s==vec.size()) s=1; if(vec[s]==c) s=0; c=getLightest(c, vec[j], vec[s]); } vec.erase(lower_bound(vec.begin(), vec.end(), c)); W[i]=c; } W[4]=getMedian(vec[0], vec[1], W[0]); vec.erase(lower_bound(vec.begin(), vec.end(), W[4])); W[5]=vec.front(); answer(W); }
#Verdict Execution timeMemoryGrader output
Fetching results...