摘要:
二分平均值x,每个数减去x , 找区间 S[ r ]- S[l]>=0 ,r-l>=m #include <iostream> #include <vector> #include <algorithm> using namespace std; const int N=1e5+5; #define 阅读全文
posted @ 2023-04-16 17:35
towboat
阅读(29)
评论(0)
推荐(0)
摘要:
一个集合中需要找到 a,b,c,d ,使得 a+b+c=d 枚举a,b ,计算a+b,存在map里 再枚举d,c ,计算d-c 是否 存在 d-c==a+b #include <iostream> #include <map> #include <algorithm> #include <vecto 阅读全文
posted @ 2023-04-16 15:53
towboat
阅读(41)
评论(0)
推荐(0)
摘要:
求 n×n 的环状方阵上的最大子矩阵和。 构造 2*n *( 2*n) 的正方形 求余的一个操作 x''= (x-1)%n+1 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const 阅读全文
posted @ 2023-04-16 12:56
towboat
阅读(36)
评论(0)
推荐(0)
摘要:
bug: 前缀和不要写错啊啊, 比如 s[r]-s[l-1] #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N=4202; int mod ; int f[N][N 阅读全文
posted @ 2023-04-16 02:40
towboat
阅读(37)
评论(0)
推荐(0)
浙公网安备 33010602011771号