当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1818:ATP

题目描述
All the tennis players are ordered by their results in an ATP (Association of Tennis Professionals) classification. The past year's statistics say that in a game, if the difference between the two opponents is more than k places in the ATP top, then the player with the better classification will win for sure; but if the difference between the players is of k places or less, then the winner is uncertain.

In a tournament that will take place in an eliminatory system, n professional players announced their participation (n = 2x, x∈N, n <= 5000). Find the player with the worst classification who could theoretically win the tournament.
输入解释
The input contains n and k separated by one space.
输出解释
The output contains a single integer, the position in the ATP classification who will win the tournament.
输入样例
16 3
输出样例
11

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Romania OI 2002

源链接: POJ-1818

最后修改于 2020-10-29T06:14:55+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 30000