关闭
当前搜索:

福建第六届省赛 最长连续串(贪心)

ZB is playing a card game where the goal is to make straights. Each card in the deck has a number between 1 and M(including 1 and M). A straight is a sequence of cards with consecutive values. Values do not wrap around, so 1 does not come after M. In addit...
阅读(324) 评论(0)

洛谷P3031 [USACO11NOV](中位数,树状数组)

题目描述 Farmer John has lined up his N (1 <= N <= 100,000) cows in a row to measure their heights; cow i has height H_i (1 <= H_i <= 1,000,000,000) nanometers--FJ believes in precise measurements! He wants to take a picture of some contiguous subsequence of ...
阅读(360) 评论(0)

欧拉函数 codeforces 776E - The Holmes Children

The Holmes children are fighting over who amongst them is the cleverest. Mycroft asked Sherlock and Eurus to find value of f(n), where f(1) = 1 and for n ≥ 2, f(n) is the number of distinct ordered positive integer pairs (x, y) that satisfy x + y = n and...
阅读(470) 评论(0)

uva1637 概率dp(记忆化搜索)

Double Patience is a single player game played with a standard 36-card deck. The cards are shuffled and laid down on a table in 9 piles of 4 cards each, faces up. After the cards are laid down, the player makes turns. In a turn he can take top cards of the...
阅读(331) 评论(0)

uva11181 条件概率

N friends go to the local super market together. The probability of their buying something from the market is p1, p2, p3, . . . , pN respectively. After their marketing is finished you are given the...
阅读(297) 评论(0)

HDU4810 亦或,组合数

Ms.Fang loves painting very much. She paints GFW(Great Funny Wall) every day. Every day before painting, she produces a wonderful color of pigments by mixing water and some bags of pigments. On the K-th day, she will select K specific bags of pigments and ...
阅读(381) 评论(0)

UVa10375(唯一分解定理)

The binomial coefficient C(m, n) is defined as C(m, n) = m! (m − n)! n! Given four natural numbers p, q, r, and s, compute the the result of dividing C(p, q) by C(r, s). Input Input consists of a sequence of lines. Each line contains four non-negative inte...
阅读(398) 评论(0)

UVa12169(拓展欧几里得)

Once upon a time, there was an NWERC judge with a tendency to create slightly too hard problems. As a result, his problems were never solved. As you can image, this made our judge somewhat frustrated. This year, this frustration has culminated, and he has ...
阅读(407) 评论(0)

最小费用流 uva10806

You are a political prisoner in jail. Things are looking grim, but fortunately, your jailmate has come up with an escape plan. He has found a way for both of you to get out of the cell and run through the city to the train station, where you will leave the...
阅读(467) 评论(0)

HDU 5934 强连通分量

There are NN bombs needing exploding. Each bomb has three attributes: exploding radius riri, position (xi,yi)(xi,yi) and lighting-cost cici which means you need to pay cici cost making it explode. If a un-lighting bomb is in or on the border the explod...
阅读(531) 评论(0)

tarjan算法的学习 uva12167,uva315,uva796

图的强连通&tarjan算法 强连通图:如果有向图G中的任意两个点u,v是互相可到达的,则称图G为强连通图。否则G为非强连通图。 强连通分量:若有向图G为非强连通图,它的子图G' 是强连通图,则称G' 为G的强连通分量。(极大强连通子图) 返图:将有向图G中的所有边的方向逆置,即u->v变为v->u 定理:对于一个有向图G,按照dfs的后序遍历到的点...
阅读(193) 评论(0)

floyd求图的最小环路 HDU1599

find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5879 Accepted Submission(s): 2346 Problem Description 杭州有N个景区,景区之间有一些双向的路来连接,现在8600想找一条旅游路线,这个路线从A点出发并且最后回到A点,假设经过的路线为V1,...
阅读(363) 评论(0)

树的最小支配集poj3659、最小点覆盖、最大独立集

Cell Phone Network Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7002 Accepted: 2509 Description Farmer John has decided to give each of his cows a cell phone in hopes to encourage their social interaction. This, however, requires him to se...
阅读(412) 评论(0)

HDU 6129 just do it(组合数奇偶性)

Just do it Time Limit: 5000/2500 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1411 Accepted Submission(s): 823 Problem Description There is a nonnegative integer sequence a1...n of length n. HazelFan wants to ...
阅读(388) 评论(0)

HDU 6090 Rikka with Graph (图论规律题)

Rikka with Graph Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1009 Accepted Submission(s): 583 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, ...
阅读(343) 评论(0)

HDU 4474 同余模定理+BFS

Yet Another Multiple Problem Time Limit: 40000/20000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 6255 Accepted Submission(s): 1451 Problem Description There are tons of problems about integer multiples. Despite...
阅读(566) 评论(0)

HDU 4465 Candy 概率期望值的对数优化

题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4465 Candy Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2888 Accepted Submission(s): 1304 Special Judge Problem Description LazyChild is ...
阅读(586) 评论(0)

ICPC2015(沈阳)HDU5521 建图技巧+最短路

Meeting Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 3533 Accepted Submission(s): 1136 Problem Description Bessie and her friend Elsie decide to have a meeting. However, after Farmer Joh...
阅读(593) 评论(0)

树上两点最近公共祖先LCA的倍增算法 poj1986

Distance Queries Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 14755 Accepted: 5187 Case Time Limit: 1000MS Description Farmer John's cows refused to run in his marathon since he chose a path much too long for their leisurely lifestyle. He ...
阅读(509) 评论(0)

矩形面积并集,2017ICPC网络赛(南宁)Overlapping Rectangles

矩形面积并集 There are nn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note that these rectangles might overlap with each other, and the overlapped areas of these rectangles shall not be counted more than once. For ...
阅读(537) 评论(0)
206条 共11页首页 上一页 1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:103698次
    • 积分:3019
    • 等级:
    • 排名:第13770名
    • 原创:197篇
    • 转载:9篇
    • 译文:0篇
    • 评论:33条
    博客专栏
    最新评论