{"problem":{"name":"Online games","description":{"content":"There is an online game with $N$ registered players.   Today, which is the $10^{100}$\\-th day since its launch, the developer Takahashi examined the users' login history. It turned out that the $i$\\-t","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc221_d"},"statements":[{"statement_type":"Markdown","content":"There is an online game with $N$ registered players.  \nToday, which is the $10^{100}$\\-th day since its launch, the developer Takahashi examined the users' login history. It turned out that the $i$\\-th player logged in for $B_i$ consecutive days from Day $A_i$, where Day $1$ is the launch day, and did not log in for the other days. In other words, the $i$\\-th player logged in on Day $A_i$, $A_i+1$, $\\ldots$, $A_i+B_i-1$, and only on those days.  \nFor each integer $k$ such that $1\\leq k\\leq N$, find the number of days on which exactly $k$ players logged in.\n\n## Constraints\n\n*   $1 \\leq N \\leq 2\\times 10^5$\n*   $1 \\leq A_i \\leq 10^9$\n*   $1 \\leq B_i \\leq 10^9$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$A_1$ $B_1$\n$A_2$ $B_2$\n$:$\n$A_N$ $B_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc221_d","tags":[],"sample_group":[["3\n1 2\n2 3\n3 1","2 2 0\n\nThe first player logged in on Day $1$, $2$, the second player logged in on Day $2$, $3$, $4$, and the third player logged in on Day $3$ only.\nThus, we can see that Day $1$, $4$ had $1$ player logged in, Day $2$, $3$ had $2$ players logged in, and the other days had no players logged in.\nThe answer is: there were $2$ days with exactly $1$ player logged in, $2$ days with exactly $2$ players logged in, and $0$ days with exactly $3$ players logged in."],["2\n1000000000 1000000000\n1000000000 1000000000","0 1000000000\n\nThere may be two or more players who logged in during the same period."]],"created_at":"2026-03-03 11:01:14"}}