luogu#P2391. 白雪皑皑
白雪皑皑
Background
"By the brushwood gate, a dog barks; through wind and snow, a traveler returns at night." Winter arrives unexpectedly. A thousand miles are frozen, and ten thousand miles are swept by snow. Feathery snow whirls in the air, and snowflakes drift down to the world. The people on the Planet of Positive Energy (a colony of pty on spore) are awed by this beauty. However, pty is not pleased; he dislikes a world of white and finds it too monotonous. So he wants to dye the snowflakes to make the world more colorful.
Problem Description
There are snowflakes arranged in a line. pty will perform coloring operations. In the -th coloring operation, he colors all snowflakes between the -th snowflake and the -th snowflake (inclusive) with color . Here are two given positive integers. He wants to know the final color of each of the snowflakes. Output for any snowflake that is never colored.
Input Format
The input consists of four lines, each containing one integer, namely , as described above.
Output Format
Output lines. The -th line contains one integer, the color of the -th snowflake.
4
3
2
4
2
2
3
0
Hint
- For of the testdata: .
- For of the testdata: , .
- For of the testdata: , .
- For of the testdata: , .
It is guaranteed that .
Translated by ChatGPT 5