CF164E Polycarpus and Tasks
Description
Polycarpus has many tasks. Each task is characterized by three integers $ l_{i} $ , $ r_{i} $ and $ t_{i} $ . Three integers $ (l_{i},r_{i},t_{i}) $ mean that to perform task $ i $ , one needs to choose an integer $ s_{i} $ $ (l_{i}
Input Format
The first line of the input contains a single integer $ n $ ( $ 1
Output Format
For each task $ i $ print a single integer — the result of processing task $ i $ on the $ i $ -th iteration of the cycle (step 3) in function $ f(A) $ . In the $ i $ -th line print:
- 0 — if you managed to add task $ i $ on step 4.
- -1 — if you didn't manage to add or replace task $ i $ (step 7).
- $ res_{i} $ ( $ 1