二分
jesHrz
这个作者很懒,什么都没留下…
展开
-
Subset POJ - 3977(折半枚举+二分查找)
题目来源:SubsetDescriptionGiven a list of N integers with absolute values no larger than 1015, find a non empty subset of these numbers which minimizes the absolute value of the sum of its elements. I...原创 2018-07-25 17:00:00 · 224 阅读 · 0 评论 -
Robin Hood CodeForces - 671B(最小值最大化+最大值最小化)
题目来源:Robin HoodStatementWe all know the impressive story of Robin Hood. Robin Hood uses his archery skills and his wits to steal the money from rich, and return it to the poor.There are n citize...原创 2018-07-24 19:33:00 · 302 阅读 · 0 评论 -
Gym - 100889H Hitting Points 计算几何+三分+二分
题目链接Hitting Points题意按逆时针顺序给你二维平面上严格凸包的n个点,编号0到n-1, 有q次询问, 每次询问确定一个编号为idx的基础点, 以idx和(idx+1)%n构成的向量为x轴, 在(k,0)这个点上有一条垂直于x轴的线绕(k,0)这个点逆时针旋转, 问第一次碰到的点的编号是多少. 如果碰到两个点就输出两个答案.做法考虑落到每一个点的时候有多少点在线的上方, 这...原创 2019-07-27 10:41:24 · 138 阅读 · 0 评论