随笔分类 - 二分/三分
摘要:C. Really Big Numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output C. Really Big Numbe
阅读全文
摘要:D. Game with modulo time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Game with modulo t
阅读全文
摘要:On his trip to Luxor and Aswan, Sagheer went to a Nubian market to buy some souvenirs for his friends and relatives. The market has some strange rules
阅读全文
摘要:This is an interactive problem. In the output section below you will see the information about flushing the output. On Sunday Leha the hacker took Nur
阅读全文
摘要:You are an experienced Codeforces user. Today you found out that during your activity on Codeforces you have made y submissions, out of which x have b
阅读全文
摘要:The main city magazine offers its readers an opportunity to publish their ads. The format of the ad should be like this: There are space-separated non
阅读全文
摘要:题目链接:https://vjudge.net/problem/CodeForces-803B#author=0 题意: 给你一个数组,其中至少包括一个0,求每一个元素距离最近一个0的距离是多少。 样例: Input 92 1 0 3 0 0 3 2 4 Input Output 2 1 0 1 0
阅读全文
摘要:Voltage Keepsake CodeForces - 801C (思维+二分) 本博以这题为原型,分析两种常用的带精度问题的二分方法 第一种,常见二分模型: 用这种模型的话,首先要根据题目确定出正确的eps,然后注意要在checkmid值后,如果满足条件,用一个double ans的额外变量被
阅读全文
摘要:题目链接 这是一道很棒的二分题。 思路: 首先先思考什么情况下是可以无限的使用,即输出-1. 我们思考可知,如果每一秒内所有设备的用电量总和小于等于充电器每秒可以充的电,那么这一群设备就可以无限使用。 接下来分析不是无限使用的情况: 题目要求的是满足某个情况的最大值。 很像二分的类型,二分题目往往就
阅读全文

浙公网安备 33010602011771号