Submission #70615

#TimeUsernameProblemLanguageResultExecution timeMemory
70615mr_bananaScales (IOI15_scales)C++17
55.56 / 100
6 ms576 KiB
#include "scales.h" #include<bits/stdc++.h> using namespace std; void init(int T) { /* ... */ } void orderCoins() { int ind[6]; ind[0]=getLightest(1,2,3); ind[2]=getHeaviest(1,2,3); ind[1]=(6-ind[0]-ind[2]); ind[3]=getLightest(4,5,6); ind[5]=getHeaviest(4,5,6); ind[4]=(15-ind[3]-ind[5]); int mx=getHeaviest(ind[2],ind[5],ind[0]); int w[6]; if(mx==ind[2]){ int ans[3]; for(int i=0;i<3;i++){ ans[i]=getNextLightest(ind[0],ind[1],ind[2],ind[3+i]); } int p1=0,p2=0; for(int i=0;i<3;i++){ while(p1<3 && ans[p1]==ind[i]){ w[p2++]=ind[3+p1]; p1++; } w[p2++]=ind[i]; } } else{ int ans[3]; for(int i=0;i<3;i++){ ans[i]=getNextLightest(ind[3],ind[4],ind[5],ind[i]); } int p1=0,p2=0; for(int i=0;i<3;i++){ while(p1<3 && ans[p1]==ind[i+3]){ w[p2++]=ind[p1]; p1++; } w[p2++]=ind[i+3]; } } answer(w); }

Compilation message (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...