atcoder#ABC221D. [ABC221D] Online games
[ABC221D] Online games
Score : points
Problem Statement
There is an online game with registered players. Today, which is the -th day since its launch, the developer Takahashi examined the users' login history. It turned out that the -th player logged in for consecutive days from Day , where Day is the launch day, and did not log in for the other days. In other words, the -th player logged in on Day , , , , and only on those days. For each integer such that , find the number of days on which exactly players logged in.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print integers with spaces in between, as follows:
Here, denotes the number of days on which exactly players logged in.
3
1 2
2 3
3 1
2 2 0
The first player logged in on Day , , the second player logged in on Day , , , and the third player logged in on Day only.
Thus, we can see that Day , had player logged in, Day , had players logged in, and the other days had no players logged in.
The answer is: there were days with exactly player logged in, days with exactly players logged in, and days with exactly players logged in.
2
1000000000 1000000000
1000000000 1000000000
0 1000000000
There may be two or more players who logged in during the same period.