![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Acm之旅_贪心
XiaoboAc
这个作者很懒,什么都没留下…
展开
-
Fishing Master 贪心!!
传送门 思路: 代码 #include<cstdio> #include<iostream> #include<cstring> #include<string> #include<algorithm> #include<queue> #include<map> #include<vector> #...原创 2019-08-23 21:09:08 · 125 阅读 · 0 评论 -
例题_CF1168A 二分+贪心
传送门 题意分析: 给定一个n代表接下来一行有n个数,然后是m代表要取余的数,你可以进行一个操作:选择任意k个数让他们+1对m取余得到一个数,这个数可以代替原数组中的数,问:最少需要多少次操作使得n个数为不下降序列 解法: 二分答案+贪心,最初的思路是要用二分去写这个题,顾名思义是要二分最后输出的答案,然后写一个check函数去检查这个答案的可行性,怎么写check函数呢?最少的操作数!!!很重...原创 2019-08-17 22:54:29 · 157 阅读 · 0 评论