Submission #18870

#TimeUsernameProblemLanguageResultExecution timeMemory
18870choyi0521라멘 (JOI14_ramen)C++98
100 / 100
0 ms1124 KiB
#include "ramen.h" void Ramen(int N) { int l, r; l = r = N%2?N - 1:-1; for (int i = 1; i < N; i += 2) { int x=i-1, y=i; if (Compare(x, y) == 1) x ^= y ^= x ^= y; if (l==-1||Compare(l,x) == 1) l = x; if (r==-1||Compare(y,r) == 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...