![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
xiaoxiede_wo
这个作者很懒,什么都没留下…
展开
-
Zoj2343
N robbers have robbed the bank. As the result of their crime they chanced to get M golden coins. Before the robbery the band has made an agreement that after the robbery i-th gangster would get Xi=Y o...原创 2017-04-20 20:00:14 · 2332 阅读 · 0 评论 -
Doing Homework again
Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands in the homework after th原创 2017-07-06 16:44:43 · 191 阅读 · 0 评论 -
D - Task
HDU - 4864 Today the company has m tasks to complete. The ith task need xi minutes to complete. Meanwhile, this task has a difficulty level yi. The machine whose level below this task’s level yi ca原创 2017-07-08 09:36:45 · 267 阅读 · 0 评论 -
Detachment(贪心+逆元+二分+模拟)
题目链接 题意,给出一个n(1≤n≤10^9),将n分成若干不相同的部分a1,a2,a3,a4,a5......,s=a1*a2*a3*a4...*am,让求s的最大值。 和相同,这部分数为连续的数的话乘积最大。拆分数以2,3,4,5....,pos,....这样的格式。 当不能恰好这样分完n时:加到pos时和比n大就停止,将pos倒着均分到每个ai上。以此使得连续的数变大。 此时有两种...原创 2018-09-19 18:43:04 · 179 阅读 · 0 评论 -
ArcSoft's Office Rearrangement(lld输出wr)
题目链接 题意:有两种操作:合并两个相邻的数;把一个数拆分成两部分。 给出n个数,用上面的两种操作,将这组数分成k组相同的数。输出最小的操作次数,不能完成输出-1. 思路:先判断这组数是否能整除K,不能就输出-1。能,tmp=sum/k,从1-n对每个数进行以下操作:ai<tmp,就向后面的数取自己缺的部分,ai>tmp就以tmp为单位拆分。中间的细节操作看代码吧。 代码写出来...原创 2018-09-14 18:08:48 · 267 阅读 · 0 评论