Submission #1057425

#TimeUsernameProblemLanguageResultExecution timeMemory
1057425juicy라멘 (JOI14_ramen)C++17
100 / 100
1 ms436 KiB
#include "ramen.h" #include <bits/stdc++.h> void Ramen(int N) { int mi = 0, ma = 0; if (N & 1) { mi = ma = N - 1; } for (int i = 0; i + 1 < N; i += 2) { int a = i, b = i + 1; if (Compare(a, b) == 1) { std::swap(a, b); } if (mi != a && Compare(mi, a) == 1) { mi = a; } if (b != ma && Compare(b, ma) == 1) { ma = b; } } Answer(mi, ma); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...