제출 #685165

#제출 시각아이디문제언어결과실행 시간메모리
685165APROHACK저울 (IOI15_scales)C++14
0 / 100
1 ms480 KiB
#include "scales.h" #include <bits/stdc++.h> #define pb push_back #define ll long long using namespace std; set<int>restantes; vector<int>r; int respuestas[4][6][6][6][6]; int mayor(int a, int b, int c){ if(respuestas[0][a][b][c][0] != -1 )return respuestas[0][a][b][c][0]; else return respuestas[0][a][b][c][0] = getHeaviest(a, b, c); } void init(int T) { } void reiniciar(){ for(int i = 1 ; i <= 6 ; i ++)restantes.insert(i); memset(respuestas, -1 , sizeof respuestas); } void getRestantesEnORden(){ r.clear(); for(auto i : restantes){ r.pb(i); } } void orderCoins() { /* ... */ reiniciar(); int W[] = {1, 2, 3, 4, 5, 6}; getRestantesEnORden(); int a = mayor(r[0], r[1], r[2]); int b = mayor(r[3], r[4], r[5]); W[5] = mayor(a, b, (r[0] == a ? r[1] : r[0])); restantes.erase(W[5]); getRestantesEnORden(); a = mayor(r[0], r[1], r[2]); W[4] = mayor(a, r[4], r[5]); restantes.erase(W[4]); getRestantesEnORden(); a = mayor(r[0], r[1], r[2]); W[3] = mayor(a, r[4], (r[0] == a ? r[1] : r[0])); restantes.erase(W[3]); getRestantesEnORden(); W[2] = mayor(r[0], r[1], r[2]); W[1] = getMedian(r[0], r[1], r[2]); restantes.erase(W[2]); restantes.erase(W[1]); getRestantesEnORden(); W[0] = r[0]; answer(W); }

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

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