http://codeforces.com/problemset/problem/103/E这道题首先一看就很像是最大权闭合子图,但是我们可以认为现在有两种点,数字和集合点,我们需要消除数字点的影响才能直接运用最大权闭合子图.进行二分匹配,使得每个集合都唯一匹配一个数字,买下一个集合点,则意味着该集...
分类:
其他好文 时间:
2015-04-12 06:30:56
阅读次数:
275
题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=248
分析:英文题目,看懂了,画几下,就发现其实就是一个贪心背包的变形,水题一个~话不多少,代码走起~
/*
部分背包的变体,水题
只需要算出每个商店的单位总费用 = 原单位费用+距离的费用
*/
#include
using namespace std;
#in...
分类:
其他好文 时间:
2015-04-08 09:09:24
阅读次数:
120
转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudBananaPiegirl is buying stickers for a project. Stickers come on sheets, and each sheet of stickers co...
分类:
其他好文 时间:
2015-04-05 10:22:33
阅读次数:
135
#include
#include
#include
#include
using namespace std;
#define N 352
/* 重量*单价+重量*距离 = 重量*(距离+单价) 预处理单价 贪心:优先买价格低的
*/
struct Node { int p;// p = (单价+...
分类:
其他好文 时间:
2015-04-01 21:41:21
阅读次数:
139
DropGG.comis the destination for savvy shoppers looking to save money by buying smart. DropGG.com allows you to easily view the recent price history o...
分类:
其他好文 时间:
2015-03-08 22:49:00
阅读次数:
208
地址:点击打开链接
题意:就是买一个售价分的饮料,然后你有的硬币有1,5,10分三种。
然后问买c瓶饮料,一次一次买,你最小的投币次数。
我们可以有几种方法:1:投8个一分 2:投一个5分的3个1分的
3:投一个10分的找3个一分的 4:投一个10分的3个一分的,找一个5分的
还有其他方案但是不是太划算。
#include
#include
#include
#include
#in...
分类:
其他好文 时间:
2015-03-05 00:20:50
阅读次数:
172
2020: [Usaco2010 Jan]Buying Feed, IITime Limit:3 SecMemory Limit:64 MBSubmit:220Solved:162[Submit][Status]Description(buying.pas/buying.in/buying.out ...
分类:
其他好文 时间:
2015-02-24 00:48:14
阅读次数:
214
I have no affiliation with the suppliers of this product, just a customer!I already own an Autel DS708 but was thinking about buying a portable code r...
分类:
其他好文 时间:
2015-02-12 11:59:40
阅读次数:
108
As a super Ford diagnostic tool, Ford VCM II IDS has gradually been received close attention by comprehensive Ford owners.While how to avoid buying a ...
分类:
其他好文 时间:
2015-01-02 14:35:24
阅读次数:
216
http://acm.nyist.net/JudgeOnline/problem.php?pid=248BUYING FEED时间限制:3000ms | 内存限制:65535KB难度:4描述FarmerJohnneeds to travel to town to pick up K (1 2#inc...
分类:
其他好文 时间:
2014-11-24 20:50:04
阅读次数:
228