| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 541823 | LucaDantas | 식물 비교 (IOI20_plants) | C++17 | 4070 ms | 8840 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "plants.h"
#include <bits/stdc++.h>
using namespace std;
constexpr int maxn = 2e5+10;
int ordem[maxn];
void init(int k, std::vector<int> r) {
int n = (int)(r.size());
for(int i = 0; i < n; i++) {
int mx = 0;
for(int j = 1; j < n; j++)
if(r[j] < r[mx] || (r[j] == r[mx] && (mx - j + n) < k))
mx = j;
ordem[mx] = i;
r[mx] = 0x3f3f3f3f;
for(int j = 0; j < k; j++)
--r[(mx - j + n) % n];
}
}
int compare_plants(int x, int y) {
return ordem[x] < ordem[y] ? 1 : -1;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
