제출 #1121010

#제출 시각아이디문제언어결과실행 시간메모리
1121010SalihSahin저울 (IOI15_scales)C++14
45.45 / 100
1 ms592 KiB
#include <bits/stdc++.h> #define pb push_back using namespace std; #include "scales.h" void init(int T) { /* ... */ } void orderCoins() { int W[6]; int x = getLightest(1, 2, 3); int y = getHeaviest(1, 2, 3); vector<int> l = {x, 6 - (x + y), y}; x = getLightest(4, 5, 6); y = getHeaviest(4, 5, 6); vector<int> r = {x, 15 - (x + y), y}; int other = 1; while(other == l[2] || other == r[2]) other++; int mx = getHeaviest(l[2], r[2], other); int li = 0, ri = 0; for(int i = 0; i < 5; i++){ if(li == 3 || mx == l[li]){ W[i] = r[ri]; ri++; continue; } if(ri == 3 || mx == r[ri]){ W[i] = l[li]; li++; continue; } int now = getLightest(l[li], r[ri], mx); W[i] = now; if(now == l[li]){ li++; } else ri++; } W[5] = mx; answer(W); }

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

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