# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
236052 | hhs2u | 라멘 (JOI14_ramen) | C++17 | 5 ms | 384 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "ramen.h"
void Ramen(int N) {
int a[222],b[222],cnt=0;
int mx,mn;
for(int i=0;i<N;i+=2)
{
if(i==N-1) a[cnt]=i,b[cnt]=i;
else
{
if(Compare(i,i+1)==1) a[cnt]=i,b[cnt]=i+1;
else b[cnt]=i,a[cnt]=i+1;
}
cnt++;
}
mx=a[0],mn=b[0];
for(int i=1;i<cnt;i++)
{
if(Compare(a[i],mx)==1) mx=a[i];
}
for(int i=1;i<cnt;i++)
{
if(Compare(mn,b[i])==1) mn=b[i];
}
Answer(mn,mx);
return;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |