{"problem":{"name":"Robot Arms","description":{"content":"In a factory, there are $N$ robots placed on a number line. Robot $i$ is placed at coordinate $X_i$ and can extend its arms of length $L_i$ in both directions, positive and negative. We want to remove","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"keyence2020_b"},"statements":[{"statement_type":"Markdown","content":"In a factory, there are $N$ robots placed on a number line. Robot $i$ is placed at coordinate $X_i$ and can extend its arms of length $L_i$ in both directions, positive and negative.\nWe want to remove zero or more robots so that the movable ranges of arms of no two remaining robots intersect. Here, for each $i$ ($1 \\leq i \\leq N$), the movable range of arms of Robot $i$ is the part of the number line between the coordinates $X_i - L_i$ and $X_i + L_i$, excluding the endpoints.\nFind the maximum number of robots that we can keep.\n\n## Constraints\n\n*   $1 \\leq N \\leq 100,000$\n*   $0 \\leq X_i \\leq 10^9$ ($1 \\leq i \\leq N$)\n*   $1 \\leq L_i \\leq 10^9$ ($1 \\leq i \\leq N$)\n*   If $i \\neq j$, $X_i \\neq X_j$.\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$X_1$ $L_1$\n$X_2$ $L_2$\n$\\vdots$\n$X_N$ $L_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"keyence2020_b","tags":[],"sample_group":[["4\n2 4\n4 3\n9 3\n100 5","3\n\nBy removing Robot $2$, we can keep the other three robots."],["2\n8 20\n1 10","1"],["5\n10 1\n2 1\n4 1\n6 1\n8 1","5"]],"created_at":"2026-03-03 11:01:14"}}