Hoax Spreading
시간 제한2초메모리 제한1024 MB
각 사용자의 접속 시간 구간이 주어질 때 같은 날 동시에 접속한 사용자끼리 거짓 정보를 공유한다. 시작 사용자별로 N일 뒤 감염된 사용자 수를 구한다.
문제
Pak Dengklek has just developed a social media site. There are users using the site, numbered to . There are hours in one day. All of these users have a fixed usage schedule from day to day. For each such that , user will be online times every day:
- from the start of the th hour to the end of the th hour,
- from the start of the th hour to the end of the th hour
- ...
- and from the start of the th hour to the end of the th hour.
At any time, all users on the site like to share news to all other online users. Unfortunately, one of the users has a hoax at the start of the first day and will spread it. Hence, all users who meet the user with the hoax will also have the hoax at the end of the first day. Two users are stated to be met if there is at least an hour where the two users are both online.
This hoax will also be spread on the second day. Therefore, all users who meet the user with the hoax at the end of the first day will also have the hoax at the end of the second day. This continued the following days.
There are scenarios, each can be represented as an integer . For each scenario, the user who has the hoax at the start of the first day is user . A different scenario might cause a different hoax spreading. Therefore, for each scenario, Pak Dengklek wonders on the number of users with the hoax at the end of the th day, where is the number of users.
제한
- (for each such that )
- The sum of all elements of does not exceed .
- (for each and such that and )
- (for each and such that and )
- The values of among all scenarios are pairwise distinct.
예제
이 문제는 공개된 예제가 없습니다.