# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
829706 | rainboy | Toxic Gene (NOI23_toxic) | C++17 | 2 ms | 388 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "toxic.h"
#include <vector>
using namespace std;
typedef vector<int> vi;
void determine_type(int n) {
vi cc(n, '?');
for (int i = 0; i < n; i++)
if (query_sample({ i + 1 }) == 0)
cc[i] = 'T';
int i = 0;
while (cc[i] != 'T')
i++;
for (int j = 0; j < n; j++)
if (cc[j] == '?')
cc[j] = query_sample({ i + 1, j + 1 }) == 0 ? 'R' : 'S';
for (i = 0; i < n; i++)
answer_type(i + 1, cc[i]);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |