이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// incorrect/subtask-shallow-wa1.cpp
#include "beechtree.h"
#include <set>
#include <algorithm>
using namespace std;
vector<int> beechtree(int N, int /*M*/, vector<int> P, vector<int> C)
{
vector<set<int>> ch_colors(N);
vector<int> t(N, 1);
for (int v = 1; v < N; ++v)
{
int u = P[v], c = C[v];
if (ch_colors[u].count(c))
{
t[u] = false;
if (u > 0)
t[0] = false;
}
else
ch_colors[u].insert(c);
}
return t;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |