suxxsfe

一言(ヒトコト)

摘要: 数学 高斯消元 需要求逆元: inline ModInt det(int n,ModInt (*a)[N]){ ModInt ans;ans=1; for(int i=1;i<=n;i++){ if(!a[i][i].x){ ans=0-ans; for(int k=i+1;k<=n;k++)if( 阅读全文
posted @ 2022-03-09 21:30 suxxsfe 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 数据结构 普通堆、可删堆 struct Node{ __attribute__((always_inline))inline int operator < (const Node &o){} __attribute__((always_inline))inline int operator == ( 阅读全文
posted @ 2022-03-09 21:28 suxxsfe 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 图论 邻接表 struct Graph{ int fir[N],nex[M],to[M],tot; inline void add(int u,int v,int flag=1){ to[++tot]=v;nex[tot]=fir[u];fir[u]=tot; if(flag) add(v,u,0) 阅读全文
posted @ 2022-03-09 21:27 suxxsfe 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 认为左括号字典序小于右括号 \(n\) 表示序列总长而不是括号对数 合法括号序列计数(共 \(k\) 种不同括号): \(\dfrac{\binom{n}{0.5n}}{0.5n+1}k^{0.5n}\) 给定括号序列求他的字典序 要求出比 \(s\) 字典序小的合法括号序列个数,枚举 \(i\), 阅读全文
posted @ 2022-03-09 20:30 suxxsfe 阅读(241) 评论(0) 推荐(1) 编辑
该文被密码保护。 阅读全文
posted @ 2022-03-09 11:13 suxxsfe 阅读(4) 评论(0) 推荐(0) 编辑