| 2020 ICPC Asia East Continent Final |
|---|
| Finished |
Prof. Pang is playing Plants vs Zombies.
Imagine that the game is played on a number axis. The following are the elements in the game:
Every second in the game is processed as follows:
Prof. Pang wants to know the death time (in seconds) of all the $$$n$$$ zombies.
The first line contains five integers $$$n,m,V,K,D$$$ ($$$1\le n,m \le 10^5, 1\le V,K,D \le 10^9$$$) separated by single spaces.
Each of the following $$$n$$$ lines contains two integers $$$t_i, h_i$$$ ($$$1\le t_i,h_i \le 10^9$$$) separated by a single space.
Each of the following $$$m$$$ lines contains two integers $$$p_i, a_i$$$ ($$$1\le p_i,a_i \le 10^9$$$) separated by a single space.
Output one line containing $$$n$$$ integers, where the $$$i$$$-th integer denotes the death time (in seconds) of the $$$i$$$-th zombie.
3 2 1 2 2 1 11 2 8 1 1 1 2 2 4
2 3 1
During the first second:
During the second second:
During the third second:
So the death times of the zombies are $$$2$$$, $$$3$$$, $$$1$$$, respectively.
| Name |
|---|


