「NnOI R2-T1」Khronostasis Katharsis

Luogu
IDLGP9569
Time1000ms
Memory512MB
DifficultyP1
数学洛谷原创O2优化
$n$ 个气球被栓在水平地面上,初始高度均为 $0$ 米,初始时刻记为第 $0$ 秒。 每个气球被剪断栓绳后会匀速上升,第 $i$ 个气球每秒上升 $v_i$ 米。 现在已知第 $i$ 个气球会在第 $t_i$ 秒时被剪断栓绳,问第 $T$ 秒时最高的气球中编号最小的一个的编号。 ## Input 第一行两个整数 $n,T$。 接下来 $n$ 行,第 $i$ 行两个整数 $v_i,t_i$。 ## Output 一行一个整数,表示答案。 [samples] ## Note **【样例 1 解释】** 第 10 秒时,五个气球的高度分别为 9,14,9,30,21 米。 **【数据范围】** 对于 $100\%$ 的数据,保证 $1\le n,v_i\le 10^5$,$0\le t_i\le T\le 10^4$。 **提示:本题开启捆绑测试。** $$ \def\r{\cr\hline} \def\None{\text{None}} \def\arraystretch{1.5} \begin{array}{c|c|c} \textbf{Subtask} & \textbf{Sp. Constraints} & \textbf{Score}\r \textsf1& n \le 1000 & 33 \r \textsf2& v_i\ 相等 & 10 \r \textsf3& t_i \ 相等 & 10 \r \textsf4& 无特殊限制 & 47 \r \end{array} $$ ### 题目来源 |项目|人员| |:-:|:-:| |idea|EstasTonne| |data|EstasTonne| |check|船酱魔王| |solution|EstasTonne|
Samples
Input #1
5 10
1 1
2 3
3 7
5 4
3 3
Output #1
4
Input #2
20 131
872 127
228 17
273 66
306 78
636 107
878 110
1141 122
835 10
247 28
248 48
65 4
664 109
267 96
1103 87
725 83
231 119
671 58
825 52
391 47
573 100
Output #2
8
API Response (JSON)
{
  "problem": {
    "name": "「NnOI R2-T1」Khronostasis Katharsis",
    "description": {
      "content": "$n$ 个气球被栓在水平地面上,初始高度均为 $0$ 米,初始时刻记为第 $0$ 秒。 每个气球被剪断栓绳后会匀速上升,第 $i$ 个气球每秒上升 $v_i$ 米。 现在已知第 $i$ 个气球会在第 $t_i$ 秒时被剪断栓绳,问第 $T$ 秒时最高的气球中编号最小的一个的编号。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGP9569"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "$n$ 个气球被栓在水平地面上,初始高度均为 $0$ 米,初始时刻记为第 $0$ 秒。\n\n每个气球被剪断栓绳后会匀速上升,第 $i$ 个气球每秒上升 $v_i$ 米。\n\n现在已知第 $i$ 个气球会在第 $t_i$ 秒时被剪断栓绳,问第 $T$ 秒时最高的气球中编号最小的一个的编号。\n\n## Input\n\n第一行两个整数 $n,T$。\n\n接下来 $n$ 行,第 $i$ 行两个整数 $v_i,t_i...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments