# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
951842 | arbuzick | Monster Game (JOI21_monster) | C++17 | 71 ms | 2708 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "monster.h"
#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, bool> mp;
bool query(int i, int j) {
if (mp.count({i, j})) {
return mp[{i, j}];
}
mp[{i, j}] = Query(i, j);
mp[{j, i}] = !mp[{i, j}];
return mp[{i, j}];
}
vector<int> my_sort(vector<int> nw) {
map<pair<int, int>, int> vl;
map<int, int> cnt;
for (int i = 0; i < (int)nw.size(); ++i) {
for (int j = i + 1; j < (int)nw.size(); ++j) {
if (query(nw[i], nw[j])) {
vl[{nw[i], nw[j]}] = 1;
cnt[nw[i]]++;
} else {
vl[{nw[j], nw[i]}] = 1;
cnt[nw[j]]++;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |