18.12 Given an NxN matrix of positive and negative integers, write code to find the submatrix with the largest possible sum. 这道求和最大的子矩阵,跟LeetCode上的Maximum Size Subarray Sum Equals k和Maximum Subarray很类似.这道题不建议使用brute force的方法,因为实在是不高效,我们需要借鉴上面LeetCode…
2021.12.09 [HEOI2016/TJOI2016]排序(线段树+二分,把一个序列转换为01串) https://www.luogu.com.cn/problem/P2824 题意: 在 2016 年,佳媛姐姐喜欢上了数字序列.因而她经常研究关于序列的一些奇奇怪怪的问题,现在她在研究一个难题,需要你来帮助她. 这个难题是这样子的:给出一个 1 到 n 的排列,现在对这个排列序列进行 m 次局部排序,排序分为两种: 0 l r 表示将区间 \([l,r]\) 的数字升序排序 1 l r 表…