제출 #93467

#제출 시각아이디문제언어결과실행 시간메모리
93467tincamatei저울 (IOI15_scales)C++14
0 / 100
14 ms508 KiB
#include <vector> #include "scales.h" void init(int T) { /* ... */ } void eraseVector(int val, std::vector<int> &x) { int i = 0; while(x[i] != val) ++i; x.erase(x.begin() + i); } void orderCoins() { int w[6]; std::vector<int> x{1, 2, 3, 4, 5, 6}; int lgt = getLightest(x[0], getLightest(x[0], x[1], x[2]), getLightest(x[3], x[4], x[5])); w[0] = lgt; eraseVector(lgt, x); lgt = getLightest(x[0], x[1], x[2]); lgt = getLightest(lgt, x[3], x[4]); w[1] = lgt; eraseVector(lgt, x); lgt = getLightest(x[0], x[1], x[2]); if(x[0] != lgt) lgt = getLightest(x[3], lgt, x[0]); else lgt = getLightest(x[3], lgt, x[1]); w[2] = lgt; eraseVector(lgt, x); lgt = getLightest(x[0], x[1], x[2]); w[3] = lgt; lgt = getMedian(x[0], x[1], x[2]); w[4] = lgt; w[5] = x[0] + x[1] + x[2] - w[3] - w[4]; answer(w); }

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

In file included from grader.c:2:0:
graderlib.c: In function 'void answer(int*)':
graderlib.c:53:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (_ghksjhdfkae19ga_ > 1) 
     ^~
graderlib.c:56:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  for (i = 0; i < 6; i++) {
  ^~~
scales.cpp: In function 'void init(int)':
scales.cpp:4:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T) {
               ^
#Verdict Execution timeMemoryGrader output
Fetching results...