
贪心
Floraqiu
有志者事竟成,破釜沉舟,百二秦关终属楚。
苦心人天不负,卧薪尝胆,三千越甲可吞吴。
展开
-
1/22 测试一(STL 模拟 贪心)E.(贪心 通过修改字母和调整顺序使字符串成为回文串)Make Palindrome
1/22 测试一(STL 模拟 贪心)E.(贪心 通过修改字母和调整顺序使字符串成为回文串)Make Palindrome A string is called palindrome if it reads the same from left to right and from right to left. For example “kazak”, “oo”, “r” and原创 2018-01-22 23:50:51 · 654 阅读 · 0 评论 -
1/22 测试一(STL 模拟 贪心)C.(贪心,给出气球,输出最好成绩)Contest Balloons
1/22 测试一(STL 模拟 贪心)C.(贪心,给出气球,输出最好成绩)Contest Balloons One tradition of ACM-ICPC contests is that a team gets a balloon for every solved problem. We assume that the submission time doesn’t matt原创 2018-01-22 23:38:55 · 336 阅读 · 0 评论 -
1/21集训二 模拟+贪心 G.(贪心 安排做作业的时间)Doing Homework again(感觉有点像HDU安排电视节目的那题(今年暑假不AC))
1/21集训二 模拟+贪心G.(贪心 安排做作业的时间)Doing Homework again(感觉有点像HDU安排电视节目的那题(今年暑假不AC)) Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives原创 2018-01-21 18:42:46 · 308 阅读 · 0 评论 -
1/21集训二 模拟+贪心 F.(贪心 处理有长度和重量的木棍,求最小处理机器的次数)Wooden Sticks
1/21集训二 模拟+贪心F.(贪心 处理有长度和重量的木棍,求最小处理机器的次数)Wooden Sticks There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodw原创 2018-01-21 18:31:49 · 301 阅读 · 0 评论 -
1/21集训二 模拟+贪心 A.(贪心)Radar Installation 【在x轴上放置雷达】
1/21集训二 模拟+贪心A.(贪心)Radar Installation 【在x轴上放置雷达】 Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in原创 2018-01-21 17:15:43 · 356 阅读 · 0 评论 -
【模拟 + 贪心】Bit String Reordering CSU - 2089
【模拟 + 贪心】Bit String Reordering CSU - 2089You have to reorder a given bit string as specified. The only operation allowed is swapping adjacent bit pairs. Please write a program that calculates the mi...原创 2018-07-25 19:21:15 · 326 阅读 · 0 评论 -
【01字典树】【贪心】【经典例题1】HDU 4825 Xor Sum 【给一个数的集合,有q次询问,每次给一个数k,求数集合中和k异或值最大的数】+ 例2 CSU - 1216 异或最大值
【01字典树】【贪心】【经典例题】HDU 4825 Xor Sum 【给一个数的集合,有q次询问,每次给一个数k,求数集合中和k异或值最大的数】字典树的实现可以看成是把一个数的二进制字符化后插入到一棵一般的字典树中,该树显然是一个只由0和1构成的二叉树01字典树适用于执行异或运算Problem Description Zeus 和 Prometheus 做了一个游戏,Pr...原创 2018-08-09 17:43:54 · 1337 阅读 · 0 评论 -
【dfs】【树形贪心】 UVA1267 Network 【树上建基站,覆盖所有叶节点】
【dfs】【树形贪心】 UVA1267 Network 【树上建基站,覆盖所有叶节点】Consider a tree network with n nodes where the internal nodes correspond to servers and the terminal nodes correspond to clients. The nodes are numbered f...原创 2018-07-28 14:03:23 · 408 阅读 · 0 评论 -
【贪心】【set】 CodeForces - 999D Equalize the Remainders 【n个数对m取余,使0 - m-1每种情况的个数都为n/m个,求最少需操作次数】
【贪心】【set】 CodeForces - 999D Equalize the Remainders 【n个数对m取余,使0 - m-1每种情况的个数都为n/m个,求最少需操作次数】You are given an array consisting of n integers a1,a2,…,an, and a positive integer m. It is guaranteed ...原创 2018-08-08 20:59:14 · 470 阅读 · 0 评论