3 2 3 1 2 1 3 2 3 3 5 1 1 5 2 2 3 1 3 2
2 3 2 3 In the first query, Takahashi will travel as follows. 1. Start in City $1$ at time $1$. 2. Take the bus that departs from City $1$ at time $1.5$ and arrives at City $2$ at time $3.5$. 3. Take the bus that departs from City $2$ at time $3.5$ and arrives at City $3$ at time $5.5$. 4. Since no bus departs from City $3$ at time $5.5$ or later, stay in City $3$ (forever). At time $5$, he will be on the bus that departs from City $2$ and arrives at City $3$. Thus, as specified in the Output section, we should print $2$ and $3$ with a space between them.
8 10 10 4 3 329982133 872113932 6 8 101082040 756263297 4 7 515073851 793074419 8 7 899017043 941751547 5 7 295510441 597348810 7 2 688716395 890599546 6 1 414221915 748470452 6 4 810915860 904512496 3 1 497469654 973509612 4 1 307142272 872178157 374358788 4 509276232 243448834 6 585993193 156350864 4 682491610 131643541 8 836902943 152874385 6 495945159 382276121 1 481368090 552433623 2 884584430 580376205 2 639442239 108790644 7 879874292 883275610 1 994982498
4 6 1 4 1 8 6 1 1 2 2 7 2 1
{
"problem": {
"name": "Greedy Takahashi",
"description": {
"content": "There are $N$ cities numbered $1$ through $N$, and $M$ buses that go between these cities. The $i$\\-th bus $(1 \\leq i \\leq M)$ departs from City $A_i$ at time $S_i+0.5$ and arrive at City $B_i$ at tim",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 4000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc212_f"
},
"statements": [
{
"statement_type": "Markdown",
"content": "There are $N$ cities numbered $1$ through $N$, and $M$ buses that go between these cities. The $i$\\-th bus $(1 \\leq i \\leq M)$ departs from City $A_i$ at time $S_i+0.5$ and arrive at City $B_i$ at tim...",
"is_translate": false,
"language": "English"
}
]
}