摘要:
拓扑排序是对ADG(有向无环图进行线性排序)模板:二维数组模拟链表#include#include#include#includeusing namespace std;int indegree[100];queue q;int n,m;bool map[100][100];int a[100];i... 阅读全文
摘要:
DescriptionJohn never knew he had a grand-uncle, until he received the notary's letter. He learned that his late grand-uncle had gathered a lot of mon... 阅读全文
摘要:
找钱问题描述:与背包问题不同,找钱问题是结果必须是把容量全部装满一.用的钱的最大最小数目把空间开大,所需求的dp值只是其中的一种特殊情况而已1.01背包模型,每种货币只能用一次最小求法#include#include#includeusing namespace std;int dp[50000],... 阅读全文
摘要:
DescriptionFarmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the sma... 阅读全文