Submission #19130

#TimeUsernameProblemLanguageResultExecution timeMemory
19130eaststar라멘 (JOI14_ramen)C++14
80 / 100
0 ms1124 KiB
#include "ramen.h" void Ramen(int n){ int i,m=0,M=1; if(Compare(0,1)>0)M=0,m=1; for(i=2;i+1<n;i+=2){ if(Compare(i,i+1)>0){ M=(Compare(i,M)>0?i:M); m=(Compare(i+1,m)<0?i+1:m); } else{ M=(Compare(i+1,M)>0?i+1:M); m=(Compare(i,m)<0?i:m); } } if(n%2){ M=(Compare(n-1,M)>0?n-1:M); m=(Compare(n-1,m)<0?n-1:m); } Answer(m,M); }

Compilation message (stderr)


#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...