zTangxx
zTangxx
全部文章
分类
归档
标签
去牛客网
登录
/
注册
zTangxx的博客
全部文章
(共4篇)
题解 | 第二题
// 第一反应动态规划 但是dp数组太大MLE // 考虑dfs+减枝 #include <bits/stdc++.h> using namespace std; string s; long long sum, half, bigAns; // bigAns为超过half的最小值 ve...
2026-03-12
1
32
题解 | 最大子矩阵
#include <bits/stdc++.h> using namespace std; int N, A[105][105], sum[105][105], column[105], maxS = INT_MIN; // 最大子数组和 int calculate(){ ve...
2026-03-10
1
29
题解 | 计算表达式
#include <bits/stdc++.h> using namespace std; string s; //运算符优先级 int priority(char op){ int p; if(op == '+' || op == '-') p = 1; if...
2026-03-10
1
32
题解 | 2的幂次方
#include <bits/stdc++.h> using namespace std; int n; void func(int n, int p){ // 正在处理n的二进制的第p位 if(n == 0) return; int res = n; // res为余...
2026-03-09
1
35