摘要: 要点 扫每个儿子时更新一次dp 阅读全文
posted @ 2019-06-10 15:53 AlphaWA 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 方法一 黑白棋盘拥有性质:(r + c) % 2的值决定颜色 因此把某色全部反转,直接求另一色的最大矩形即可,单调栈的经典问题 阅读全文
posted @ 2019-06-10 14:47 AlphaWA 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 要点 将边作为染色,如果交叉则异色 C++ include include include using namespace std; int n, m; int a[101], b[101], c[101]; int main() { scanf("%d %d", &n, &m); for (int 阅读全文
posted @ 2019-06-10 14:40 AlphaWA 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 要点 没想到的一点是,对于堆里的某牌,最好情况是它出来时后边都准备就绪了,答案是$p[i] + (n i + 1)$,所有的这个取最大的即可 一发结束的情况先特判一下 C++ const int maxn = 2e5 + 5; int n, pos, ans; int a[maxn], b[maxn 阅读全文
posted @ 2019-06-10 14:31 AlphaWA 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 虽然不是正解但毕竟自己做出来了还是记下来吧~ 对每个人分别dfs得到其期望,某两维的组合情况有限所以Hash一下避免了MLE。 C++ include include include include include using namespace std; const int maxn = 51, 阅读全文
posted @ 2019-06-10 14:22 AlphaWA 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 要点 用A、B、C一般式确定每条直线 将合法的圆心中点存到每条直线所属的vector中 枚举所有线段,二分后$O(1)$得到其中存在多少答案,累加 C++ include include include include include include include include using na 阅读全文
posted @ 2019-06-10 14:16 AlphaWA 阅读(145) 评论(0) 推荐(0) 编辑