
贪心
YRZ-James
who say you are not perfect?
展开
-
zoj 3778 Talented Chef
题目: As we all know, Coach Gao is a talented chef, because he is able to cook M dishes in the same time. Tonight he is going to have a hearty dinner with his girlfriend at his home. Of course, Coach Ga...原创 2019-03-21 21:29:32 · 106 阅读 · 0 评论 -
ZOJ - 2091 Mean of Subsequence
题目: Given N numbers in a line, we can determine a continuous subsequence by giving its start position and its length. PMH and Roy played a game the other day. Roy gives the start position first, then ...原创 2019-03-22 18:36:25 · 101 阅读 · 0 评论 -
HihoCoder - 1653 公平分队
题目: 小Hi和小Ho在玩一个战争游戏。游戏中2N个战斗单位,其中第i个单位的战斗力是Ai。 现在小Hi和小Ho要各选N个单位组成队伍,当然他们都希望自己队伍的总战斗力越大越好。 为了使分队更加公平,经过亲切友好的磋商,小Hi和小Ho达成共识按照以下步骤确定分队: 小Ho将2N个单位分成两队,每队N个战斗单位;然后自己选择其中一队,把另一队给小Hi。 小Hi有权利要求交换一对战斗单位;如果他行使...原创 2019-03-23 11:27:35 · 140 阅读 · 0 评论 -
HihoCoder - 1615 矩阵游戏II
题目: 给定一个NxN的整数矩阵,小Hi每次操作可以选择两列,将这两列中的所有数变成它的相反数。 小Hi可以进行任意次操作,他的目标是使矩阵中所有数的和尽量大。你能求出最大可能的和吗? Input 第一行一个整数N。 以下N行,每行N个整数Aij。 对于30%的数据,2 ≤ N ≤ 10 对于100%的数据,2 ≤ N ≤ 200, -1000 ≤ Aij ≤ 1000 Output 最大可能的和...原创 2019-03-23 12:50:31 · 189 阅读 · 0 评论