답안 #841444

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
841444 2023-09-01T15:40:20 Z model_code 참나무 (IOI23_beechtree) C++17
0 / 100
1 ms 228 KB
// 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;
}
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -