# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
31095 | platinant | 라멘 (JOI14_ramen) | C++14 | 0 ms | 1180 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 <vector>
using namespace std;
vector<int> a,b;
void Ramen(int N) {
for(int i=0;i<N;i+=2){
if(i+1<N){
if(Compare(i,i+1)>0){
a.push_back(i+1);
b.push_back(i);
}else{
a.push_back(i);
b.push_back(i+1);
}
}else{
a.push_back(i);
b.push_back(i);
}
}
int x=a[0],y=b[0];
for(int i=1;i<a.size();i++){
if(Compare(x,a[i])>0)x=a[i];
if(Compare(y,b[i])<0)y=b[i];
}
Answer(x,y);
}
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... |