二分
云淡风轻jzl
一路脚踏实地,不忘仰望星空。
展开
-
牛客5531C-牛牛的揠苗助长-二分+中位数
链接:https://ac.nowcoder.com/acm/contest/5531/C?&headNav=acm来源:牛客网题目描述:牛牛有一块长度大小为n的菜园,他首先对这块菜园从1到n进行了编号,每一块地分别为1号、2号…n号菜地,然后他往每块菜地中都种下了一些水稻,一开始,第i块菜地中的水稻高度均为a[i]个单位。然后我们知道水稻的生长周期都是n天,也就是说每逢n天水稻就会长高一个单位。但是不巧的是整个菜园中每一块菜地的生长周期都错开了,具体来说,第1天的时候第1块菜地中的水稻长高一原创 2020-05-08 23:07:58 · 270 阅读 · 0 评论 -
牛客3007E-立方数-欧拉线性筛+素数分解+二分
链接:https://ac.nowcoder.com/acm/contest/3007/E来源:牛客网题目描述:对于给定的正整数 N,求最大的正整数 A,使得存在正整数 B,满足 A3B=N输入包含 T 组数据,1≤T≤10,000;1≤N≤1018输入描述:第一行数字 T 表示数据组数接下来一行,T 个正整数 N输出描述:T 行,每行一个数字表示答案输入样例:427 24...原创 2020-02-15 20:46:33 · 456 阅读 · 0 评论 -
CF1288D-Minimax Problem-二分+二进制状态压缩
DescriptionYou are given n arrays a1, a2, …, an; each array consists of exactly m integers. We denote the y-th element of the x-th array as ax,y.You have to choose two arrays ai and aj (1≤i,j≤n, it ...原创 2020-01-15 11:26:22 · 623 阅读 · 0 评论 -
牛客3402E-一步两步是魔鬼的步伐-二分
题目描述:链接:https://ac.nowcoder.com/acm/contest/3402/E来源:牛客网数据已修改,比赛时的所有提交已经进行了rejudge。假面骑士要过河,恰好河的两岸间有N(0 ≤ N ≤ 50,000)块石头在同一条直线上。他已经知道了河的宽度L(1 ≤ L ≤ 1,000,000,000)和每一块石头离假面骑士所在河岸的距离Di(0 < Di <...原创 2019-12-30 08:37:54 · 239 阅读 · 0 评论 -
HDU 1160-FatMouse's Speed-最长下降子序列-两种求法
FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence...原创 2019-07-26 11:27:40 · 143 阅读 · 0 评论 -
CF 1187B-Letters Shop-二分查找
The letters shop showcase is a string s, consisting of n lowercase Latin letters. As the name tells, letters are sold in the shop.Letters are sold one by one from the leftmost to the rightmost. Any c...原创 2019-08-01 20:12:22 · 255 阅读 · 0 评论 -
HDU 6695-Welcome Party-线段树+set二分
DescriptionThe annual welcome party of the Department of Computer Science and Technology is coming soon! Many students have been applying to show up at the welcome party, and every one of them can ch...原创 2019-08-21 20:28:59 · 357 阅读 · 0 评论 -
计蒜客-Longest subsequence-枚举+二分
DescriptionString is a very useful thing and a subsequence of the same string is equally important.Now you have a string s with length n and a string t with length m. Find out the longest subsequenc...原创 2019-09-09 11:34:04 · 222 阅读 · 0 评论 -
HDU 6156-Palindrome Function-预处理+枚举+二分
DescriptionAs we all know,a palindrome number is the number which reads the same backward as forward,such as 666 or 747.Some numbers are not the palindrome numbers in decimal form,but in other base,t...原创 2019-09-27 08:57:00 · 211 阅读 · 0 评论