این مسابقه در تاریخ پنج شنبه ۱۴ دی به صورت حضوری در سایت دانشکده برق و کامپیوتر دانشگاه تهران برگزار شد.
We have a city with apartments labeled with postal codes to . The th road in this city, connects apartments and . Consider delivering food orders to each apartment in the city in the following manner:
For each , Snapp Food wants to solve the following problem:
Find the number of ways in which we can deliver orders to the apartments, modulo
The first line of the input is the number of apartments . The following lines, each define a road from apartment to .
For each in this sequence, print a line containing the answer to the problem.