摘要:
一般分为两种做法: ##DP法 复杂度O(n*m) 问题引入 有一个n*m的矩阵,初始为白色,里面有s个黑色格子,现在问能在矩阵里面找到的最大不包含 黑色格子的子矩阵/正方形(n, m<=1000, s<=n*m) 例题:P2701 [USACO5.3]巨大的牛棚Big Barn(https://w 阅读全文
摘要:
#include<bits/stdc++.h> #define LL long long using namespace std; struct node { LL x, y; } a[5010]; int main() { LL L, W; scanf("%lld%lld", &L, &W); i 阅读全文