Submission #132419

#TimeUsernameProblemLanguageResultExecution timeMemory
132419redaScales (IOI15_scales)C++14
10.36 / 100
17 ms380 KiB
#include<bits/stdc++.h> #include "scales.h" using namespace std; void init(int T) { return; } bool cmp(int x,int y) { for(int i=1;i<=3;i++) { if(x==i||y==i)continue; int ans=getLightest(x,y,i); if(ans==i) {ans=getHeaviest(x,y,i);return (ans==y);} else return (ans==x); } } void orderCoins() { int w[6]={1,2,3,4,5,6}; sort(w,w+6,cmp); answer(w); return; }

Compilation message (stderr)

scales.cpp: In function 'void init(int)':
scales.cpp:4:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T) {
               ^
scales.cpp: In function 'bool cmp(int, int)':
scales.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
#Verdict Execution timeMemoryGrader output
Fetching results...