제출 #284151

#제출 시각아이디문제언어결과실행 시간메모리
284151diegoangulo5저울 (IOI15_scales)C++14
0 / 100
1 ms416 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; vector<int>n; void init(int T) { /* ... */ } int excluir(int a, int b, int x, int y, int z){ if(a!=x && b!=x)return x; if(a!=y && b!=y)return y; return z; } int excluir(int a, int x, int y, int z){ if(a!=x)return x; return y; } void quitar(int a){ vector<int>::iterator it = n.begin(); for(;it!=n.end();it++){ if(*it == a){ n.erase(it); return; } } } void orderCoins() { n.clear(); for(int a=0;a<6;a++)n.push_back(a+1); int w[6] = {0,0,0,0,0,0}; int a = getLightest(1,2,3); int b = getLightest(4,5,6); int c; w[0] = getLightest(a,b, excluir(a, 1, 2, 3)); quitar(w[0]); if(w[0] == a){ c = excluir(a, 1, 2, 3); w[1] = getLightest(b, c, excluir(a, c, 1, 2, 3)); } if(w[0] == b){ c = excluir(b, 4, 5, 6); w[1] = getLightest(a, c, excluir(b, c, 4, 5, 6)); } quitar(w[1]); a = getLightest(n[0], n[1], n[2]); w[2] = getLightest(a, n[3], excluir(a, n[3], n[0], n[1], n[2])); quitar(w[2]); if(a != w[2]){ w[3] = a; } else w[3] = a; w[4] = getMedian(n[0], n[1], n[2]); quitar(w[3]); quitar(w[4]); w[5] = n[0]; answer(w); }

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

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