VK Cup 2017 Round 3 + Codeforces Round #412
Posted 翠竹叶飞
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了VK Cup 2017 Round 3 + Codeforces Round #412相关的知识,希望对你有一定的参考价值。
A 读题题
B 就是你排名第p,得了x分,而最终至少需要y分,你需要最少的successful hack,使得最终得分s>=y,且由s随机取25个数,使p被选中。
(1)暴力枚举hack成功几次,失败几次就好了
(2)另解:枚举尽可能小的s,使|s-x|=0(mod 50),分类讨论
If s?≤?x, we need 0 successful hacks, since we can just make (x?-?s)?/?50 unsuccessful hacks.
If s?>?x and s?-?x is divisible by 100, we need exactly (s?-?x)?/?100 successful hacks.
If s?>?x and s?-?x is not divisible by 100, we need (s?-?x?+?50)?/?100 successful hacks and one unsuccessful hack.
C 一看到题就打了exgcd,调了一晚上,各种看错,最后发现爆long long了。。
其实列个不等式解就好了
以上是关于VK Cup 2017 Round 3 + Codeforces Round #412的主要内容,如果未能解决你的问题,请参考以下文章
Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3) B. T-Shirt Hunt
Codeforces Round #405 (rated, Div. 2, based on VK Cup 2017 Round 1) C
Codeforces Round #405 (rated, Div. 2, based on VK Cup 2017 Round 1) B
Codeforces Round #405 (rated, Div. 2, based on VK Cup 2017 Round 1) A
Codeforces Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3) C. Stairs and Elevators二分查找(示例(代
Codeforces Round #472 (rated, Div. 2, based on VK Cup 2018 Round 2)