| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 940430 | Sundavar | Monster Game (JOI21_monster) | C++17 | 106 ms | 420 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "monster.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> Solve(int N) {
std::vector<int> T(N);
vector<int> cnt(N);
vector<int> amb1, amb2;
for(int i = 0; i < N; i++){
for(int j = 0; j < i; j++) if(j != i)
if(Query(i,j)) cnt[i]++;
else cnt[j]++;
}
for(int i = 0; i < N; i++){
if(cnt[i] == 1) amb1.push_back(i);
if(cnt[i] == N-2) amb2.push_back(i);
}
(Query(amb1[0], amb1[1]) ? cnt[amb1[0]] : cnt[amb1[1]])--;
(Query(amb2[0], amb2[1]) ? cnt[amb2[1]] : cnt[amb2[0]])++;
for (int i = 0; i < N; i++) T[i] = cnt[i];
return T;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
