QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 2048 MB 總分: 100

#5733. 超速

统计

你想知道一辆车在笔直的道路上行驶时是否超速。遗憾的是,你没有任何雷达枪或相关仪器来直接测量速度;你所拥有的只是在不同时间于道路上各个检查点拍摄的汽车照片。给定这些照片拍摄的时间和地点,你能证明该车在道路上某一点行驶的最快速度是多少?

输入格式

第一行包含一个整数 $N$,表示拍摄的照片数量,其中 $2 \le N \le 100$。接下来的 $N$ 行,每行包含两个整数 $t_i$ 和 $d_i$,其中 $0 \le t_i \le 10\,000$ 且 $0 \le d_i \le 1\,000\,000$。第一张照片总是在时间 $0$、距离 $0$ 时拍摄的。时间和距离均严格递增。即 $t_{i+1} > t_i$ 且 $d_{i+1} > d_i$。

输出格式

输出你可以确定该车在某一点行驶时所达到的最大整数速度。

样例

输入 1

2
0 0
7 42

输出 1

6

Figure 1. Illustration of a car being monitored for speed.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.