2023年4月15日
摘要: 给出平面上的n个点,找一个矩形,使得边界上包含的点尽可能地多。 先维护前缀和 col[i][j],row[i][j] ,表示i行前j个的和。。 枚举上下边界,右边界,考虑维护左边届 #include <iostream> #include <cstring> #include <algorithm> 阅读全文
posted @ 2023-04-15 22:25 towboat 阅读(16) 评论(0) 推荐(0)
摘要: 利用网格图上空白的方格上建一个矩形的建筑。问地区中建筑物的最大面积 递推(dp) #include <iostream> #include <cstring> #include <sstream> using namespace std; const int N=1e3+2; char a[N][N 阅读全文
posted @ 2023-04-15 20:54 towboat 阅读(17) 评论(0) 推荐(0)
摘要: https://www.luogu.com.cn/problem/UVA1652 阅读全文
posted @ 2023-04-15 16:01 towboat 阅读(8) 评论(0) 推荐(0)
摘要: 有两个1~n 的排列A,B, B是1,2,3...n, 给出A每个数位置变化(往后,往前,不变) 问A排列数? 观察以下发现是个二分图匹配的模型,考虑dp f[i ][ j] 考虑前i个,有j个未匹配 #include <iostream> #include <cstring> using name 阅读全文
posted @ 2023-04-15 02:01 towboat 阅读(29) 评论(0) 推荐(0)