Submission #800718

#TimeUsernameProblemLanguageResultExecution timeMemory
800718firewaterScales (IOI15_scales)C++14
0 / 100
1 ms468 KiB
#include "scales.h" #include <assert.h> #include <stdio.h> #include <stdlib.h> #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define ll long long using namespace std; // int getHeaviest(int A, int B, int C) // int getMedian(int A, int B, int C) // int getLightest(int A, int B, int C) // int getNextLightest(int A, int B, int C, int D) #define N 100 int w,x,y,a[N],p[N],sav,ans[6]; void init(int T) { /* ... */ } void orderCoins() { /* ... */ x=0;y=2; ans[x]=y; for(int i=1;i<=6;++i)p[i]=0; p[y]=1; for(int i=1;i<=5;++i){ w=0; for(int j=1;j<=6;++j) if(!p[j])a[++w]=j; sav=a[1]; for(int j=2;j<=w;++j) sav=getMedian(ans[0],sav,a[j]); ans[i]=sav; p[sav]=1; } answer(ans); }

Compilation message (stderr)

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