P11155 [MX-X6-T1] Subtask Dependency
Background
Original problem link: .
Description
There is an OI problem. This problem has $n$ subtasks, numbered from $1$ to $n$. Subtask $i$ depends on $d_i$ subtasks, whose numbers are $a_{i,1},a_{i,2},\dots,a_{i,d_i}$. It is guaranteed that for all $1\leq i\leq n,1\leq j\leq d_i$, we have $a_{i,j}
Input Format
The first line contains an integer $n$, the number of subtasks.
The next $n$ lines: on the $i$-th line, first input an integer $d_i$, the number of subtasks that subtask $i$ depends on; then input $d_i$ integers $a_{i,1},a_{i,2},\dots,a_{i,d_i}$, the indices of the dependent subtasks. It is guaranteed that all $a_{i,j}
Output Format
Output $m$ lines. On the $i$-th line, output the score of the $i$-th contestant.
Explanation/Hint
**Sample Explanation #1**
- Contestant 1's program can pass all subtasks, so the results of all $3$ subtasks are correct.
- Contestant 2's program cannot pass subtask $2$, so subtask $2$ will be judged as wrong. Since subtask $3$ depends on subtask $2$, even if contestant 2's program can pass subtask $3$, subtask $3$ will still be judged as wrong. This contestant's judging result has only subtask $1$ correct.
- Contestant 3's program cannot pass any subtask, so the results of all subtasks are wrong.
**Constraints**
For all testdata, $1\leq n,m\leq 100$, $0\leq d_i