제출 #1196816

#제출 시각아이디문제언어결과실행 시간메모리
1196816sleepntsheep라멘 (JOI14_ramen)C11
80 / 100
0 ms328 KiB
/*https://codeforces.com/problemset/problem/730/B*/ #include "ramen.h" void Ramen(int N) { int h, l; if (Compare(0, 1) == 1) h = 0, l = 1; else l = 0, h = 1; for (int i = 2; i + 1 < N; i += 2) { if (Compare(i, i + 1) == 1) { if (Compare(i, h) == 1) h = i; if (Compare(l, i + 1) == 1) l = i + 1; } else { if (Compare(i + 1, h) == 1) h = i + 1; if (Compare(l, i) == 1) l = i; } } if (N % 2) { if (Compare(N - 1, h) == 1) h = N - 1; if (Compare(l, N - 1) == 1) l = N - 1; } Answer(l, h); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...