摘要: 确实不难但是考场上怎么就没做出来/kk 阅读全文
posted @ 2021-06-03 22:20 DReamLion 阅读(65) 评论(1) 推荐(0) 编辑
摘要: 因为涉及一些校内模拟赛题目所以锁了,密码是我名字 阅读全文
posted @ 2021-06-01 19:47 DReamLion 阅读(20) 评论(0) 推荐(0) 编辑
摘要: T1 money 没错就是原题[NOI2018提高组]货币系统 这必然是一道完全背包 code: #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #define m 阅读全文
posted @ 2021-06-01 19:44 DReamLion 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 套路 其实套路挺明显的,也很容易看出来要用状压,所以通常就把一行的状态压缩成一个数(一般适用于放不放棋子这类的只有选/不选两种状态的) (有可能会有特殊情况,比如炮兵阵地就是三进制状压,这个我们先不管) 核心代码大概长这样,根据不同题的不同限制改一改就行了: void dp(){ f[0][0]=1 阅读全文
posted @ 2021-05-25 23:41 DReamLion 阅读(59) 评论(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 阅读(89) 评论(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 阅读(50) 评论(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 阅读(44) 评论(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 阅读(98) 评论(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 阅读(94) 评论(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 阅读(44) 评论(0) 推荐(0) 编辑