
贪心
文章平均质量分 85
anantheparty
OIer
展开
-
【noip】国王游戏 贪心 高精度
说实话我一开始是不想发这道题的,虽然比较水,但不知道是不是因为我太久都没有写高精度了,还是写错了,才40分,还是发上来吧。 描述 恰逢H国国庆,国王邀请n位大臣来玩一个有奖游戏。首先,他让每个大臣在左、右手上面分别写下一个整数,国王自己也在左、右手上各写一个整数。然后,让这n位大臣排成一排,国王站在队伍的最前面。排好队后,所有的大臣都会获得国王奖赏的若干金币,每位大臣获得的金币数分别是原创 2016-08-25 19:09:01 · 1007 阅读 · 0 评论 -
【Codeforces 645E】【贪心】Intellectual Inquiry
Intellectual Inquiry Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description After getting kicked out of her reporting job for not knowing the alph原创 2016-10-14 18:02:02 · 495 阅读 · 0 评论 -
【Codeforces 534D】【贪心】Handshakes
Handshakes Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description On February, 30th n students came in the Center for Training Olympiad Programmer原创 2016-10-13 09:42:26 · 454 阅读 · 0 评论 -
【Codeforces708C】【树形dp】【贪心】Centroids
Centroids Time Limit: 4000MS Memory Limit: 524288KB 64bit IO Format: %I64d & %I64u Description Tree is a connected acyclic graph. Suppose you are given a tree consisting of n v原创 2016-10-14 11:24:07 · 1057 阅读 · 0 评论 -
【Codeforces403B】【贪心】Upgrading Array
Upgrading Array Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description You have an array of positive integers a[1], a[2], …, a[n] and a set of bad原创 2016-10-12 21:49:19 · 502 阅读 · 1 评论 -
【CodeForces 5C】【贪心】【dp】Longest Regular Bracket Sequence
Longest Regular Bracket Sequence Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description This is yet another problem dealing with regular bracket s原创 2016-10-12 10:16:18 · 335 阅读 · 0 评论 -
【Codeforces 578B】【贪心】"Or" Game
“Or” Game Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description You are given n numbers a1, a2, …, an. You can perform at most k operations. For原创 2016-10-12 08:10:46 · 537 阅读 · 0 评论 -
【Codeforces549B】【贪心】Looksery Party
Looksery Party Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description The Looksery company, consisting of n staff members, is planning another big原创 2016-10-11 20:02:15 · 368 阅读 · 0 评论 -
【Codeforces529B】【贪心】Group Photo 2
Group Photo 2 Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description Many years have passed, and n friends met at a party again. Technologies have原创 2016-10-11 18:59:36 · 540 阅读 · 1 评论 -
【CodeForces 500B】【贪心】New Year Permutation
New Year Permutation Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description User ainta has a permutation p1, p2, …, pn. As the New Year is coming,原创 2016-10-11 16:36:54 · 465 阅读 · 0 评论 -
【Codeforces 605A】【贪心】Sorting Railway Cars
Sorting Railway Cars Time Limit: 2000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description An infinitely long railway has a train consisting of n cars, numbered原创 2016-10-11 16:31:03 · 362 阅读 · 0 评论 -
【bzoj1827】[Usaco2010 Mar]gather 奶牛大集会 贪心 树规
题目描述 Bessie正在计划一年一度的奶牛大集会,来自全国各地的奶牛将来参加这一次集会。当然,她会选择最方便的地点来举办这次集会。每个奶牛居住在 N(1<=N<=100,000) 个农场中的一个,这些农场由N-1条道路连接,并且从任意一个农场都能够到达另外一个农场。道路i连接农场A_i和B_i(1 <= A_i <=N; 1 <= B_i <= N),长度为L_i(1 <= L_i <=原创 2016-08-27 08:20:10 · 595 阅读 · 0 评论 -
【Codeforces 549G】【贪心】Happy Line
Happy Line Time Limit: 1000MS Memory Limit: 262144KB 64bit IO Format: %I64d & %I64u Description Do you like summer? Residents of Berland do. They especially love eating ice cre原创 2016-10-14 21:35:59 · 380 阅读 · 0 评论