随笔分类 -  二分/三分

摘要: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 阅读全文
posted @ 2019-01-27 22:15 茄子Min 阅读(465) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-23 14:00 茄子Min 阅读(577) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-21 15:22 茄子Min 阅读(350) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-17 21:30 茄子Min 阅读(288) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-15 15:39 茄子Min 阅读(426) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2019-01-09 15:36 茄子Min 阅读(318) 评论(0) 推荐(0)
摘要:题目链接: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 阅读全文
posted @ 2019-01-08 20:13 茄子Min 阅读(222) 评论(0) 推荐(0)
摘要:Voltage Keepsake CodeForces - 801C (思维+二分) 本博以这题为原型,分析两种常用的带精度问题的二分方法 第一种,常见二分模型: 用这种模型的话,首先要根据题目确定出正确的eps,然后注意要在checkmid值后,如果满足条件,用一个double ans的额外变量被 阅读全文
posted @ 2019-01-08 01:14 茄子Min 阅读(509) 评论(0) 推荐(1)
摘要:题目链接 这是一道很棒的二分题。 思路: 首先先思考什么情况下是可以无限的使用,即输出-1. 我们思考可知,如果每一秒内所有设备的用电量总和小于等于充电器每秒可以充的电,那么这一群设备就可以无限使用。 接下来分析不是无限使用的情况: 题目要求的是满足某个情况的最大值。 很像二分的类型,二分题目往往就 阅读全文
posted @ 2019-01-08 00:54 茄子Min 阅读(283) 评论(0) 推荐(0)