摘要: 1 #include<bits/stdc++.h> 2 #define ls (x<<1) 3 #define rs (x<<1|1) 4 #define rep(i,a,b) for(int i=a;i<=b;i++) 5 #define pb(a) push_back(a) 6 using na 阅读全文
posted @ 2022-01-07 21:44 matt-11 阅读(43) 评论(0) 推荐(0)
摘要: 这题是线段树的区间加、区间修改和懒标记,注意开long long 1 #include<bits/stdc++.h> 2 #define ls (x<<1) 3 #define rs (x<<1|1) 4 #define rep(i,a,b) for(int i=a;i<=b;i++) 5 #def 阅读全文
posted @ 2022-01-07 17:04 matt-11 阅读(55) 评论(0) 推荐(0)
摘要: 1 int dp[11][11]; 2 int a[11]; 3 4 class Solution { 5 public: 6 long long dfs(int eq,int dep,int sum) 7 { 8 if(!dep)return sum; 9 if(~dp[dep][sum]&&!e 阅读全文
posted @ 2022-01-07 13:29 matt-11 阅读(31) 评论(0) 推荐(0)