6 3 2 3 4 2 3 5 0 1 5 0 0
5 3 4 2 To read book $1$, you must read books $2,3,4$; to read book $2$, you must read books $3,5$; to read book $4$, you must read book $5$. To read books $3,5,6$, you do not have to read any other books. For example, if you read books $5,3,4,2$ in this order, you can read book $1$. This is a correct answer, because you will never be able to read book $1$ with three or fewer books read. As another example, reading books $3,5,4,2$ in this order also allows you to read book $1$ with $4$ books read.
6 1 2 1 3 1 4 1 5 1 6 0
6 5 4 3 2
8 1 5 1 6 1 7 1 8 0 0 0 0
5
{
"problem": {
"name": "Prerequisites",
"description": {
"content": "We have $N$ books numbered $1$ to $N$. Book $i$ assumes that you have read $C_i$ books, the $j$\\-th of which is book $P_{i,j}$: you must read all these $C_i$ books before reading book $i$. Here, y",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc315_e"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have $N$ books numbered $1$ to $N$. \nBook $i$ assumes that you have read $C_i$ books, the $j$\\-th of which is book $P_{i,j}$: you must read all these $C_i$ books before reading book $i$. \nHere, y...",
"is_translate": false,
"language": "English"
}
]
}