摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 3010; int n; int a[N], b[N]; int f[N][N]; int main() { cin >> n; for (int i = 1; i <= n; 阅读全文
posted @ 2022-06-17 23:49 wKingYu 阅读(35) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 60; int n, res; int a[N], up[N], down[N]; void dfs(int u, int su, int sd) { if (su + sd > 阅读全文
posted @ 2022-06-17 22:48 wKingYu 阅读(30) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n; int a[N], q[N], f[N]; int main() { while (cin >> a[n]) n ++; int res = 0, cn 阅读全文
posted @ 2022-06-17 21:32 wKingYu 阅读(36) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 1010; int n; int a[N], f[N]; int main() { cin >> n; for (int i = 1; i <= n; i ++) cin >> 阅读全文
posted @ 2022-06-17 12:59 wKingYu 阅读(36) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> #include<algorithm> #define fi first #define se second using namespace std; const int N = 5010; int n; int f[N]; pair<int,in 阅读全文
posted @ 2022-06-17 12:07 wKingYu 阅读(34) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<iostream> using namespace std; const int N = 110; int n; int a[N], f[N], ff[N]; int main() { cin >> n; for (int i = 1; i <= n; i ++) c 阅读全文
posted @ 2022-06-17 10:40 wKingYu 阅读(35) 评论(0) 推荐(0)