Submission #154053

#TimeUsernameProblemLanguageResultExecution timeMemory
154053combi1k1라멘 (JOI14_ramen)C++14
50 / 100
3 ms504 KiB
#include "ramen.h" #include<bits/stdc++.h> int L = 0; int R = 0; void calc(int l,int r) { if (r - l == 0) { L = R = l; return; } if (r - l == 1) { L = l; R = r; if (Compare(L,R) < 0) L = r, R = l; return; } int m = (l + r) / 2; calc(l,m); ++m; int ll = L; int rr = R; calc(m,r); if (Compare(L,ll) < 0) L = ll; if (Compare(R,rr) > 0) R = rr; } void Ramen(int n) { calc(0,n - 1); Answer(R,L); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...