Submission #6004

#TimeUsernameProblemLanguageResultExecution timeMemory
6004kriii라멘 (JOI14_ramen)C++98
0 / 100
0 ms1124 KiB
#include "ramen.h" #include <vector> void Ramen(int N) { int l=-1,r=-1; if (N % 2) l = r = N-1; for (int i=0;i<N;i+=2){ int x = i, y = i + 1, t; if (Compare(i,i+1) == 1) t = x, x = y, y = t; if (l == -1 || Compare(x,l) == -1) l = x; if (r == -1 || Compare(r,y) == -1) r = y; } Answer(l,r); }

Compilation message (stderr)


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