随笔分类 - 数据结构:二分
摘要:给出N个人在0时刻的财富值M[i](所有人在0时刻的财富互不相等),以及财富增长速度S[i],随着时间的推移,某些人的财富值会超越另外一些人。如果时间足够长,对于财富增长最快的人来说,他的财富将超越所有其他对手。 求发生的前10000次超越,分别是谁超过了谁?如果总的超越次数不足10000,则输出所
阅读全文
摘要:A I Count Two Three I will show you the most popular board game in the Shanghai Ingress Resistance Team.It all started several months ago.We found out
阅读全文
摘要:链接:https://www.nowcoder.com/acm/contest/117/F来源:牛客网 ghc很喜欢吃汤圆,但是汤圆很容易被粘(zhān)漏。 根据多年吃汤圆经验,ghc总结出了一套汤圆防漏理论: 互相接触的汤圆容易粘(zhān)在一起,并且接触面积不同,粘(zhān)在一起的粘(n
阅读全文
摘要:平面上有N个圆,他们的圆心都在X轴上,给出所有圆的圆心和半径,求有多少对圆是相离的。 例如:4个圆分别位于1, 2, 3, 4的位置,半径分别为1, 1, 2, 1,那么{1, 2}, {1, 3} {2, 3} {2, 4} {3, 4}这5对都有交点,只有{1, 4}是相离的。 Input Ou
阅读全文
摘要:K的因子中只包含2 3 5。满足条件的前10个数是:2,3,4,5,6,8,9,10,12,15。 所有这样的K组成了一个序列S,现在给出一个数n,求S中 >= 给定数的最小的数。 例如:n = 13,S中 >= 13的最小的数是15,所以输出15。 Input Output Input示例 Out
阅读全文
摘要:Description 某人在山上种了N棵小树苗。冬天来了,温度急速下降,小树苗脆弱得不堪一击,于是树主人想用一些塑料薄 膜把这些小树遮盖起来,经过一番长久的思考,他决定用3个L*L的正方形塑料薄膜将小树遮起来。我们不妨将山建 立一个平面直角坐标系,设第i棵小树的坐标为(Xi,Yi),3个L*L的正
阅读全文
摘要:The Frog's Games Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 7802 Accepted Submission(s): 367
阅读全文
摘要:DESCRIPTION There are nn buildings lined up, and the height of the ii-th house is hihi. An inteval [l,r][l,r](l≤r)(l≤r) is harmonious if and only if m
阅读全文
摘要:Assemble Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 783 Accepted Submission(s): 297 Problem
阅读全文
摘要:SAMPLE INPUT 3 10 1 1 2 10 1 5 5 SAMPLE INPUT 3 10 1 1 2 10 1 5 5 3 10 1 1 2 10 1 5 5 3 10 1 1 2 10 1 5 5 SAMPLE OUTPUT 5 对价值排序,每次二分价值,剩下的就是一个典型的01背包问
阅读全文
摘要:Cup Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8887 Accepted Submission(s): 2720 Problem Des
阅读全文
摘要:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=113&page=show_problem&problem=1282 Solve the equation:p∗e−x + q∗sin(x)
阅读全文
摘要:http://codeforces.com/problemset/problem/670/D2 http://codeforces.com/problemset/problem/670/D1 time limit per test 1 second time limit per test memor
阅读全文

浙公网安备 33010602011771号