摘要:
A. Chess Tourney Berland annual chess tournament is coming! Organizers have gathered 2·n chess players who should be divided into two teams with n peo 阅读全文
摘要:
就很简单很简单的dp 只能从右或者从下走 所以 dp方程直接看下面公式吧 反正也不难 #include<bits/stdc++.h> using namespace std; const int maxn = 550; int s[maxn][maxn]; int dp[maxn][maxn]; i 阅读全文
摘要:
没想到居然可以O(n3)暴力过 就是大概之前的 最大连续子序列和 加成2维度了 枚举起始列 和 终止列 然后计算从1到n行最大的子矩阵的和 注意n 和 m 的输入顺序!! #include<bits/stdc++.h> using namespace std; typedef long long l 阅读全文