제출 #285864

#제출 시각아이디문제언어결과실행 시간메모리
285864Ozy저울 (IOI15_scales)C++17
55.56 / 100
1 ms384 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for (int i = (a); i <= (b); i++) int W[6]; void init(int T) { /* ... */ } void orderCoins() { /* ... */ int a,b,c,c1,cont; int arr[4]; a = getLightest(1,2,3); b = getLightest(4,5,6); c = a+1; if (c == b) c++; W[0] = getLightest(a,b,c); if (W[0] == a) { c = 1; if (c == a) c++; c1 = c+1; if (c1 == a) c1++; W[1] = getLightest(b,c,c1); } else { c = 4; if (c == b) c++; c1 = c+1; if (c1 == b) c1++; W[1] = getLightest(a,c,c1); } cont = 1; rep(i,0,3) { arr[i] = cont; cont++; while (arr[i] == W[0] || arr[i] == W[1]) { arr[i] = cont; cont++; } } a = getLightest(arr[0],arr[1],arr[2]); b = arr[0]; if (b == a) b = arr[1]; W[2] = getLightest(a,b,arr[3]); cont = 0; a = arr[cont++]; if (arr[cont-1] == W[2]) a = arr[cont++]; b = arr[cont++]; if (arr[cont-1] == W[2]) b = arr[cont++]; c = arr[cont++]; if (arr[cont-1] == W[2]) c = arr[cont++]; W[3] = getLightest(a,b,c); W[5] = getHeaviest(a,b,c); if (a != W[3] && a != W[5]) W[4] = a; else if (b != W[3] && b != W[5]) W[4] = b; else W[4] = c; answer(W); return; }

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

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