传送门 总之可以先预处理出来每个位置最多往上延伸多少 枚举两行,看看夹在这两行中间的列最大能构成多大的矩形 可以看出,必须得在一个两行都没有X的区间才有可能构成最大的答案 那么可以把这些区间处理出来,在看看这些区间中的点最左边和最右边的能从下面那一行向上延伸到上面那一行的点,更新ans即可 #include <cstdio> #define N 201 #define max(x, y) ((x) > (y) ? (x) : (y)) int n, m, ans, p; int h[N]…
4506: [Usaco2016 Jan]Fort Moo Description Bessie is building a fort with her friend Elsie. Like any good fort, this one needs to start with a sturdy frame. Bessie wants to build a frame in the shape of a one-meter-wide rectangular outline, atop which…
Mex Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 3056 Accepted Submission(s): 1006 Problem Description Mex is a function on a set of integers, which is universally used for impartial game…