// 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 |
1 |
Correct |
0 ms |
228 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
216 KB |
Output is correct |
2 |
Correct |
0 ms |
220 KB |
Output is correct |
3 |
Incorrect |
0 ms |
212 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
228 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
228 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
228 KB |
Output is correct |
2 |
Incorrect |
1 ms |
228 KB |
2nd lines differ - on the 1st token, expected: '0', found: '1' |
3 |
Halted |
0 ms |
0 KB |
- |