3 3 1 2 4 7 5 9
2 The figure below describes the arrangements of walls in Sample Input $1$.  He can destroy all walls with two punches, such as the following. (Below, $\lbrack a, b \rbrack$ denotes the range from the $a$\-th through $b$\-th columns.) * First, punch $\lbrack 2, 4 \rbrack$. The walls existing in $\lbrack 2, 4 \rbrack$ ― Walls $1$ and $2$ ― are damaged and destroyed. * Second, punch $\lbrack 5, 7 \rbrack$. The wall existing in $\lbrack 5, 7 \rbrack$ ― Wall $3$ ― is damaged and destroyed. It is also possible to destroy all walls with two punches in this way: * First, punch $\lbrack 7, 9 \rbrack$ to destroy Walls $2$ and $3$. * Second, punch $\lbrack 1, 3 \rbrack$ to destroy Wall $1$.
3 3 1 2 4 7 4 9
1 The difference from Sample Input/Output $1$ is that Wall $3$ now covers $\lbrack 4, 9 \rbrack$, not $\lbrack 5, 9 \rbrack$. In this case, he can punch $\lbrack 2, 4 \rbrack$ to destroy all walls with one punch.
5 2 1 100 1 1000000000 101 1000 9982 44353 1000000000 1000000000
3
{
"problem": {
"name": "Destroyer Takahashi",
"description": {
"content": "In a town divided into a grid with $N$ rows and $10^9$ columns, there are $N$ walls, numbered $1$ to $N$. Wall $i$ ranges from the $L_i$\\-th column to the $R_i$\\-th column from the left in the $i$\\-",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "abc230_d"
},
"statements": [
{
"statement_type": "Markdown",
"content": "In a town divided into a grid with $N$ rows and $10^9$ columns, there are $N$ walls, numbered $1$ to $N$. \nWall $i$ ranges from the $L_i$\\-th column to the $R_i$\\-th column from the left in the $i$\\-...",
"is_translate": false,
"language": "English"
}
]
}