581466A - Подготовка к экзамену
We identify 3 cases for $$$k$$$.
- $$$k=n$$$. Monocarp passes the exam for all question lists.
- $$$k \lt n-1$$$. Monocarp does not pass the exam for any question list.
- $$$k == n-1$$$. There is one question, $$$q$$$, for which Monocarp does not know the answer. He will pass the exam for list $$$i$$$ only if $$$a_i=q$$$.
Original problem: 2051C - Подготовка к экзамену, leads to official tutorial and all solutions including WS solution: 301141282







