Submission #60705

#TimeUsernameProblemLanguageResultExecution timeMemory
60705dukati8Scales (IOI15_scales)C++14
45.45 / 100
4 ms620 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a; i<int(b); i++) int t; void init(int T) { t=T; } void orderCoins() { set<int> leftset={1,2,3,4,5,6}; int W[6]; int cand1,cand2; cand1=getLightest(1,2,3); cand2=getLightest(4,5,6); if (1!=cand1) W[0]=getLightest(cand1,cand2,1); else W[0]=getLightest(cand1,cand2,2); leftset.erase(W[0]); vector<int> left; for (auto a:leftset) left.push_back(a); cand1=getLightest(left[0],left[1],left[2]); W[1]=getLightest(cand1,left[3],left[4]); leftset.erase(W[1]); left.clear(); for (auto a:leftset) left.push_back(a); cand1=getLightest(left[0],left[1],left[2]); W[2]=getMedian(W[0],cand1,left[3]); leftset.erase(W[2]); left.clear(); for (auto a:leftset) left.push_back(a); W[3]=getLightest(left[0],left[1],left[2]); W[4]=getMedian(left[0],left[1],left[2]); W[5]=21-W[0]-W[1]-W[2]-W[3]-W[4]; 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++) {
  ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...