제출 #357950

#제출 시각아이디문제언어결과실행 시간메모리
357950amunduzbaev저울 (IOI15_scales)C++14
0 / 100
1 ms364 KiB
#include "scales.h" #ifndef EVAL #include "grader.cpp" #endif #include "bits/stdc++.h" using namespace std; #define sz(x) (int)x.size() #define pb push_back void init(int T) { /* ... */ } void orderCoins() { vector<int> res = {1, 2, 3, 4, 5, 6}, ans; vector<int>::iterator x; int a = res[0], b = res[1], c = res[2]; int mn = getLightest(a, b, c); a = res[5], b = res[3], c = res[4]; //cout<<a<<" "<<b<<" "<<c<<"\n"; int mm = getLightest(a, b, c); int in = 0; while(res[in] == mn || res[in] == mm) in++; mn = getLightest(mn, mm, res[in]); //cout<<mn<<" "<<mm<<" "<<res[in]<<"\n"; ans.pb(mn); for(x = res.begin(); x!=res.end(); x++) if((*x) == mn) break; res.erase(x); a = res[0], b = res[1], c = res[2]; //cout<<a<<" "<<b<<" "<<c<<"\n"; mn = getLightest(a, b, c); ans.pb(mn); //cout<<mn<<" "<<res[3]<<" "<<res[4]<<"\n"; mn = getLightest(mn, res[3], res[4]); for(x = res.begin(); x!=res.end(); x++) if((*x) == mn) break; res.erase(x); //cout<<a<<" "<<b<<" "<<c<<"\n"; a = res[0], b = res[1], c = res[2]; mn = getLightest(a, b, c); in = 0; while(res[in] == mn) in++; //cout<<mn<<" "<<res[in]<<" "<<res[4]<<"\n"; mn = getLightest(mn, res[in], res[3]); ans.pb(mn); for(x = res.begin(); x!=res.end(); x++) if((*x) == mn) break; res.erase(x); a = res[0], b = res[1], c = res[2]; //cout<<a<<" "<<b<<" "<<c<<"\n"; mn = getLightest(a, b, c); ans.pb(mn); a = res[0], b = res[1], c = res[2]; //cout<<a<<" "<<b<<" "<<c<<"\n"; mn = getMedian(a, b, c); ans.pb(mn); a = res[0], b = res[1], c = res[2]; //cout<<a<<" "<<b<<" "<<c<<"\n"; mn = getHeaviest(a, b, c); ans.pb(mn); int w[6]; //for(auto x:ans) cout<<x<<" "; //puts(""); for(int i=0;i<6;i++) w[i] = ans[i]; //for(int i=0;i<6;i++) c answer(w); }

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

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