链接:http://codeforces.com/problemset/problem/447/D 题意:一个n*m的矩阵。能够进行k次操作,每次操作室对某一行或某一列的的数都减p,获得的得分是这一行或列原来的数字之和。求N次操作之后得到的最高得分是多少。 思路:首先分别统计每行和每列的数字和。 进 ...
分类:
其他好文 时间:
2017-05-22 15:02:13
阅读次数:
124
Tomya is a girl. She loves Chef Ciel very much. Tomya like a positive integer p, and now she wants to get a receipt of Ciel's restaurant whose total p ...
分类:
其他好文 时间:
2017-05-19 19:29:59
阅读次数:
230
DZY loves chessboard, and he enjoys playing with it. He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are goo ...
分类:
其他好文 时间:
2017-05-18 15:44:03
阅读次数:
213
题目例如以下: Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall w ...
分类:
其他好文 时间:
2017-05-16 20:07:11
阅读次数:
162
MG loves string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 131 Accepted Submission(s): 50 ...
分类:
其他好文 时间:
2017-05-15 14:24:23
阅读次数:
211
Monk's Love for Food Monk's Love for Food Our monk loves food. Hence,he took up position of a manager at Sagar,a restaurant that serves people with de ...
分类:
其他好文 时间:
2017-05-13 12:24:55
阅读次数:
200
转载请注明出处:http://blog.csdn.net/u012860063?viewmode=contents 题目链接:http://codeforces.com/problemset/problem/445/A DZY loves chessboard, and he enjoys play ...
分类:
其他好文 时间:
2017-05-11 11:39:35
阅读次数:
194
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5676 题意: 定义幸运数为:只存在4和7且4和7数量相等的数,给出n,求比>=n的最小幸运数 思路: 因为n最多18位,幸运数最大是10个4,10个7,这种情况特判掉,爆longlong,其他的暴力搜 ...
分类:
其他好文 时间:
2017-05-10 20:31:26
阅读次数:
148
http://acm.hdu.edu.cn/showproblem.php?pid=6019 题意:给出n个颜色的物品,你每次取只能取连续的不同颜色的物品,问最少要取多少次。 思路:从头往后扫,用set存之前取了什么物品,然后每次重复就clear,ans++。 ...
分类:
其他好文 时间:
2017-05-05 21:44:56
阅读次数:
251
首先要知道选择行列操作时顺序是无关的 用两个数组row[i],col[j]分别表示仅选择i行能得到的最大值和仅选择j列能得到的最大值 这个用优先队列维护,没选择一行(列)后将这行(列)的和减去对应的np (mp)又一次增加队列 枚举选择行的次数为i,那么选择列的次数为k - i次,ans = row ...
分类:
其他好文 时间:
2017-05-04 21:41:50
阅读次数:
156