摘要:
代码一: //背包问题 #include<iostream> #include<vector> #include<algorithm> using namespace std; struct node{ double w; double p; double t; }; int cmp(const n 阅读全文
摘要:
vector非结构体,const不要忘了 #include<iostream> #include<algorithm> #include<vector> using namespace std; bool cmp(const int &x,const int &y){ return x>y; } i 阅读全文
摘要:
最长公共子序列 //最长公共子序列(个数) #include<iostream> using namespace std; int c[100][100]={0}; int len1,len2; int gcd(string a,string b){ len1=a.length(); len2=b. 阅读全文