# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
502070 | tengiz05 | Monster Game (JOI21_monster) | C++17 | 111 ms | 292 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "monster.h"
#include <bits/stdc++.h>
namespace {
std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());
std::vector<int> sort(std::vector<int> a) {
if (a.size() == 1) {
return a;
}
int m = a.size() / 2;
std::shuffle(a.begin(), a.end(), rnd);
std::vector<int> l(a.begin(), a.begin() + m), r(a.begin() + m, a.end());
l = sort(l);
r = sort(r);
int i = 0, j = 0;
for (int k = 0; k < int(a.size()); k++) {
if (i == int(l.size())) {
a[k] = r[j++];
} else if (j == int(r.size())) {
a[k] = l[i++];
} else if (Query(l[i], r[j])) {
a[k] = r[j++];
} else {
a[k] = l[i++];
}
}
return a;
}
std::vector<int> slow(std::vector<int> a) {
int n = a.size();
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |