摘要:
#include<bits/stdc++.h> using namespace std; const int N = 110; struct Node { int weight; //重量 int volume; //体积 int money; //让利金额 } a[N]; /** 测试用例 10 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; const int N = 1010; int n, m; int v[N], w[N]; int f[N]; /** 测试用例: 80 2 18 10 30 20 */ //完全背包问题 int main( 阅读全文
摘要:
题目: #include<bits/stdc++.h> using namespace std; const int N = 1010; int n, m; int v[N], w[N]; int f[N]; int main() { //优化输入 ios::sync_with_stdio(fals 阅读全文
摘要:
题目传送门 #include <bits/stdc++.h> using namespace std; //2^7是极大值,就是 128是队伍的最大值,完全二叉树的最底层是128,上面肯定是127个,加在一起是255个,声明一个大于255的数字N可以保存的下 const int N = 260; i 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; stack<char> s; int num; /** 测试用例: 2 [({})] ()[]() */ char trans(char a) { if (a == ')') return '('; if ( 阅读全文