09 2016 档案
摘要:重温了这道cdq+FFT 讲白了就是不断对 dp[l~mid] 和 sh[1~r] 进行fft 得到 dp[mid+1~r] #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 1e5
阅读全文
摘要:FFT 就可以了 比赛时候没时间做了 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int INF = 0x3f3f3f3f; const int MAXN = 6e4+5; int A[MAXN<<
阅读全文
摘要:题解的那种前缀和以前没学过,感觉是种套路 #include<bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; const int MAXN = 1e4+5; #define lson l,m,rt<<1 #define r
阅读全文
摘要:这题题解dp不懂 因为不知道它怎么记录dp的答案的 字符串那么长 我是贪心过得,当时还被四个人hack,都没成功,hhhhh 大意就是优先从头取字典序小的字母,担也要让后面不管怎么取都合法 #include<bits/stdc++.h> using namespace std; const int
阅读全文
摘要:这题惩罚我这种经常不管常数的懒人 直接 1e6 TLE 如果1e5对数组枚举过 诶其实很想吐槽些伤心事,但是还是不想在博客上吐口水 不管今年比赛结果如何 请享受比赛 #include<bits/stdc++.h> using namespace std; const int INF = 0x3f3f
阅读全文
摘要:神他妈随便写写就能过… 暴力枚举每个取不取 两个剪纸: 1.当剩下可用的时间小于最少需要用的时间 跳出 2.当剩下的植物按照理想情况(甚至可以取一部分)得到的极限答案比已经求出的答案大 跳出 #include<bits/stdc++.h> using namespace std; const int
阅读全文
摘要:简单说就是左边x,y按照奇偶分为四种对于答案的影响都是不相关的 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 1e3+5; int N,M; ll tree[4][MAXN][M
阅读全文
摘要:裸的树链剖分加线段树区间修改 区间合并时需要多注意一点 当时写的很慢 理解不深刻 #include<bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; const int MAXN = 40005; #define lson
阅读全文
摘要:我对于题目的一种理解 改造农场 1.建新农场 在空的点选 2.重建旧农场 选一个点属于这个农场的地方都要选 最后的农场都不能相连 所以枚举旧农场的个数并进行二分图匹配 #include<bits/stdc++.h> using namespace std; int N,M; char mp[12][
阅读全文
摘要:基本思路就是二分 每条边分别二分求 c++11 用fflush(sdtout) 不行 囧啊 #include<bits/stdc++.h> using namespace std; int ans[2][4]; int inp; int check(int x1,int y1,int x2,int
阅读全文
摘要:dp题 并运用了前缀和 我看题目提示中有fft 我想了下感觉复杂度不过关还是未解 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 4e5+5; const int MOD = 1e
阅读全文
摘要:这个题解错了网上还没有题解 囧 fi = (i%2)? 1 : -1 Fn = (n+m−1m−1) - ∑ni=0 ∑m−1j=1 (n−i∗(j+1)+m−2 m−2) * (m−1 j)*fj Fn *= m #include<bits/stdc++.h> using namespace st
阅读全文
摘要:树的点分治 感觉理解的不够深刻 等想好再多写点 #include <iostream> #include <queue> #include <stack> #include <map> #include <set> #include <bitset> #include <cstdio> #inclu
阅读全文
摘要:模拟 首先可以求出 0 和 1 的个数 之后按照01 10 的个数贪心安排 细节太多 错的都要哭了
阅读全文

浙公网安备 33010602011771号