| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1348773 | Zone_zonee | 라멘 (JOI14_ramen) | C++20 | 0 ms | 344 KiB |
#include "ramen.h"
#include <bits/stdc++.h>
void Ramen(int N) {
std::vector<int> hi, lo;
for(int i = 0; i+1 < N; i += 2){
if(Compare(i, i+1) == 1){
hi.push_back(i);
lo.push_back(i+1);
}else{
hi.push_back(i+1);
lo.push_back(i);
}
}
if(N&1){
hi.push_back(N-1);
lo.push_back(N-1);
}
int mx = hi.front(), mn = lo.front();
for(int i = 1; i < hi.size(); ++i){
if(Compare(mx, hi[i]) == -1) mx = hi[i];
}
for(int i = 1; i < lo.size(); ++i){
if(Compare(mn, lo[i]) == 1) mn = lo[i];
}
Answer(mn, mx);
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
