摘要:
#include#include#include#define N 20using namespace std;int main(){ stackS; int n, i, j, k, a[N]; char s1[N], s2[N]; while(scanf("%d", &n)... 阅读全文
摘要:
#include#include#include#include#define N 10using namespace std;void Q(int n){ int m; char s[N]; queueQ; while(n--) { scanf("%s"... 阅读全文
摘要:
背包模板(01背包,完全背包,多重背包)一、01背包:#define N ..///N这个值是根据具体的题目来定的int v; ///v为总的容量int dp[N];void ZeroOnePack(int cost,int weight){ for(int j=v;j>=cost;j--... 阅读全文