Submission #765747

#TimeUsernameProblemLanguageResultExecution timeMemory
765747boyliguanhanScales (IOI15_scales)C++17
55.56 / 100
1 ms212 KiB
#include "scales.h" #include<algorithm> #define x(b,c) if(X==c) std::swap(b,c); void init(int T) {} void orderCoins(){ int a=getLightest(1,2,3); int f=getHeaviest(4,5,6); int b=1+(a==1),c=2+(a<=2); int d=4+(f==4),e=5+(f<=5); int X=getLightest(a,d,e); x(a,d) x(a,e) X=getHeaviest(f,b,c); x(f,b) x(f,c) X=getLightest(b,c,d); x(b,c) x(b,d) X=getLightest(b,d,e); x(b,e) X=getHeaviest(c,d,e); x(e,c) x(e,d) X=getLightest(c,d,e); x(c,d); int w[]={a,b,c,d,e,f}; answer(w); }

Compilation message (stderr)

scales.cpp: In function 'void init(int)':
scales.cpp:4:15: warning: unused parameter 'T' [-Wunused-parameter]
    4 | void init(int T) {}
      |           ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...