# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
679828 | bashkort | Monster Game (JOI21_monster) | C++17 | 111 ms | 1700 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "monster.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> Solve(int n) {
vector<int> ord(n);
iota(ord.begin(), ord.end(), 0);
mt19937 rnd(228);
shuffle(ord.begin(), ord.end(), rnd);
map<pair<int, int>, bool> asked;
auto ask = [&](int i, int j) {
if (!asked.count({i, j})) {
asked[{i, j}] = Query(i, j);
asked[{j, i}] = !asked[{i, j}];
}
return asked[{i, j}];
};
stable_sort(ord.begin(), ord.end(), [&](int i, int j) {
return !ask(i, j);
});
int k = min(n, 10);
vector<int> win(k);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |