05 2021 档案

摘要:套路 其实套路挺明显的,也很容易看出来要用状压,所以通常就把一行的状态压缩成一个数(一般适用于放不放棋子这类的只有选/不选两种状态的) (有可能会有特殊情况,比如炮兵阵地就是三进制状压,这个我们先不管) 核心代码大概长这样,根据不同题的不同限制改一改就行了: void dp(){ f[0][0]=1 阅读全文
posted @ 2021-05-25 23:41 DReamLion 阅读(92) 评论(0) 推荐(0)
摘要:#快读快写 /*快读*/ template<typename T> inline void read(T &x){ x=0; bool flag=0; char c=getchar(); for(;!isdigit(c);c=getchar()) if(c=='-') flag=1; for(;is 阅读全文
posted @ 2021-05-22 17:53 DReamLion 阅读(110) 评论(1) 推荐(0)
摘要:板子 题目 #include<iostream> #include<cmath> #include<cstdio> #include<cstdlib> #define maxn 110 using namespace std; template<typename T> inline void rea 阅读全文
posted @ 2021-05-22 17:40 DReamLion 阅读(59) 评论(0) 推荐(0)
摘要:板子 题目 #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #define maxn 110 #define ll long long using namespace std; template<type 阅读全文
posted @ 2021-05-22 17:18 DReamLion 阅读(70) 评论(0) 推荐(0)
摘要:\(2021.05.10\) 基础数学和组合数学2 \(B \ G \ H \ by \ DReamLion\) upd:排队化简过程 B P2822 组合数问题 给出组合数公式,求满足0<=i<=n,0<=j<=min(i,m)的条件下,i选j的组合数是k的倍数有多少种可能 一看数据范围,n<=2 阅读全文
posted @ 2021-05-10 22:32 DReamLion 阅读(129) 评论(3) 推荐(1)
摘要:题目 没有任何思维含量,但是压位高精能搞一天 为了避免这种情况,是时候发挥python水高精的作用了 本人代码 a=(int)(input()) b=(int)(input()) c=a%b while c!=0: a=b b=c c=a%b print(b) 来自Blueqwq import fr 阅读全文
posted @ 2021-05-09 10:17 DReamLion 阅读(128) 评论(0) 推荐(1)
摘要:有向图强连通分量SCC P3387【模板】缩点 注释放代码里啦 时间复杂度O(n+m) #include<iostream> #include<cstdio> #include<cstdlib> #define maxn 100010 #define maxm 1000010 using names 阅读全文
posted @ 2021-05-08 20:40 DReamLion 阅读(65) 评论(0) 推荐(0)
摘要:P3376【模板】网络最大流 在全机房的共同努力下搞出来的 假的写法 实测836ms比EK还慢 (来自Blueqwq) #include<iostream> #include<cstdio> #include<cstdlib> #include<queue> #include<cstring> #d 阅读全文
posted @ 2021-05-05 21:53 DReamLion 阅读(70) 评论(1) 推荐(1)
摘要:#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #define maxn 200010 using namespace std; template <typename T> inline void r 阅读全文
posted @ 2021-05-01 22:00 DReamLion 阅读(46) 评论(0) 推荐(0)