Submission #262940

#TimeUsernameProblemLanguageResultExecution timeMemory
262940dolphingarlic라멘 (JOI14_ramen)C++14
100 / 100
1 ms384 KiB
#include "ramen.h" void Ramen(int N) { int lo = -1, hi = -1; if (N & 1) lo = hi = N - 1; for (int i = 0; i < N - 1; i += 2) { if (~Compare(i, i + 1)) { if (hi == -1 || ~Compare(i, hi)) hi = i; if (lo == -1 || ~Compare(lo, i + 1)) lo = i + 1; } else { if (hi == -1 || ~Compare(i + 1, hi)) hi = i + 1; if (lo == -1 || ~Compare(lo, i)) lo = i; } } Answer(lo, hi); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...