摘要:
一道区间 DP cpp include using namespace std; const int N=51; int n,c; int w[N],a[N]; int f[N][N][2],s[N]; //f[i,j,0/1] 关 [i,j] 的灯,现在在左 / 右端点的位置 //s 表示功率的前 阅读全文
摘要:
SDOI2011古代朱文 cpp include/ {{{ / include include include include include include include include include include include include using namespace std; t 阅读全文
摘要:
莫队算法模板题 cpp include include include include include include include include include include include using namespace std; typedef long long lld; typede 阅读全文
摘要:
题意:一个序列A,支持单点修改,查询位于x\bmod p=y的所有A[x]的和。 算见注 cpp include include using namespace std; const int N=150004; int n,m; int a[N]; int tab[1000][1000]; in 阅读全文
摘要:
队长 · 韩天新 队员 ·GavinZheng&sshwy C 班 RK1.<! more "题面" B. by sshwy C. by GavinZheng cpp include include using namespace std; int main(){ int ans=1 a b c; 阅读全文
摘要:
2018.8.14 ![Siyuan 小姐姐系列.png][1] 讲题解以前,先膜拜一下 Siyuan 小姐姐家族的人 题面 [0814.pdf][2] A. 数学水题 by sshwy & xry C. 矩阵加速(加分块?) by sry I. 逆序对 by sshwy [1]: https:// 阅读全文
摘要:
关键在于读题 知道要求的东西后,直接建立数据结构直接暴力即可 时间复杂度 O(n^3) <! more cpp include using namespace std; const int N=302; int n,s; vector e[N],p[N];//next path int pre[ 阅读全文
摘要:
分析 对于一条信息 x,y,将两者之间的牛的高度 1. 考虑差分,将区间修改转化为单点修改 注意,排除重复信息 cpp include include include using namespace std; const int N=10004; int n,r,h;//I 省略 int 阅读全文