제출 #119045

#제출 시각아이디문제언어결과실행 시간메모리
119045oolimry저울 (IOI15_scales)C++14
55.56 / 100
9 ms432 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; void init(int T) { /* ... */ } vector<int> stuff[500]; void orderCoins() { /* ... */ int W[] = {7, 7, 7, 7, 7, 7}; int l1 = getLightest(1,2,3); int h1 = getHeaviest(1,2,3); int m1 = 1; if(h1 == 1 || l1 == 1){ m1 = 2; if(h1 == 2 || l1 == 2) m1 = 3; } int l2 = getLightest(4,5,6); int h2 = getHeaviest(4,5,6); int m2 = 4; if(h2 == 4 || l2 == 4) { m2 = 5; if(h2 == 5 || l2 == 5) m2 = 6; } int impt1 = getNextLightest(1,2,3,m2); //cout << l1 << m1 << h1 << l2 << m2 << h2 << "\n"; if(impt1 == h1){ int x = getMedian(l1,l2,m1); if(x == l1){ W[0] = l2; W[1] = l1; W[2] = m1; } else if(x == l2){ W[0] = l1; W[1] = l2; W[2] = m1; } else{ W[0] = l1; W[1] = m1; W[2] = l2; } W[3] = m2; if(getHeaviest(l1,h1,h2) == h1){ W[4] = h2; W[5] = h1; } else{ W[5] = h2; W[4] = h1; } } else if(impt1 == l1){ if(getHeaviest(m2,l1,l2) == m2){ W[4] = m2; W[5] = h2; if(getLightest(l1,l2,m1) == l1){ W[0] = l1; int x = getMedian(m1,h1,l2); //printf("ddd\n"); if(x == h1){ W[1] = m1; W[2] = h1; W[3] = l2; } else if(x == l2){ W[1] = m1; W[2] = l2; W[3] = h1; } else{ W[1] = l2; W[2] = m1; W[3] = h1; } } else{ W[0] = l2; W[1] = l1; W[2] = m1; W[3] = h1; } } else{ W[0] = l2; W[1] = m2; if(getLightest(l1,m1,h2) == h2){ W[2] = h2; W[3] = l1; W[4] = m1; W[5] = h1; } else{ W[2] = l1; int x = getMedian(m1,h1,h2); if(x == m1){ W[3] = h2; W[4] = m1; W[5] = h1; } else if(x == h1){ W[3] = m1; W[4] = h1; W[5] = h2; } else{ W[3] = m1; W[4] = h2; W[5] = h1; } } } } else{ W[2] = m2; if(getLightest(l1,l2,m2) == l1){ W[0] = l1; W[1] = l2; } else{ W[0] = l2; W[1] = l1; } int x = getMedian(m1,h1,h2); if(x == m1){ W[3] = h2; W[4] = m1; W[5] = h1; } else if(x == h1){ W[3] = m1; W[4] = h1; W[5] = h2; } else{ W[3] = m1; W[4] = h2; W[5] = h1; } } 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...