| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1162709 | gmroh06 | 라멘 (JOI14_ramen) | C++20 | 0 ms | 320 KiB |
#include <bits/stdc++.h>
#include "ramen.h"
using namespace std;
using ll = long long;
void Ramen(int n) {
vector<ll> w, l;
for (ll i = 0; i < n; i += 2) {
if (Compare(i, i + 1) == 1) {
w.emplace_back(i);
l.emplace_back(i + 1);
} else {
w.emplace_back(i + 1);
l.emplace_back(i);
}
}
if (n & 1) {
w.emplace_back(n - 1);
l.emplace_back(n - 1);
}
ll x = w[0], y = l[0];
for (ll i = 1; i < w.size(); i++) {
if (Compare(x, w[i]) == -1) {
x = w[i];
}
}
for (ll i = 1; i < l.size(); i++) {
if (Compare(y, l[i]) == 1) {
y = l[i];
}
}
Answer(x, y);
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
