# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
486361 | leinad2 | 라멘 (JOI14_ramen) | C++17 | 1 ms | 204 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"
#include<bits/stdc++.h>
using namespace std;
void Ramen(int N)
{
vector<int>A, B;
for(int i=0;i<N;i+=2)
{
if(i==N-1)
{
A.push_back(i);
B.push_back(i);
}
else
{
if(Compare(i, i+1)==1)B.push_back(i),A.push_back(i+1);
else A.push_back(i),B.push_back(i+1);
}
}
int mx=A[0];
for(int i=1;i<A.size();i++)
{
if(Compare(A[i], mx)==-1)mx=A[i];
}
int mn=B[0];
for(int i=1;i<B.size();i++)
{
if(Compare(B[i], mn)==1)mn=B[i];
}
Answer(mx, mn);
}
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... |