摘要: 先收藏一下:https://blog.csdn.net/liangzhaoyang1/article/details/72639208 阅读全文
posted @ 2019-06-17 22:46 韵意 阅读(179) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2019-06-17 16:22 韵意 阅读(37) 评论(0) 推荐(0) 编辑
摘要: https://scut.online/p/337 这个东西是个阶梯状的。那么可以考虑存两棵树,一棵树是阶梯的,另一棵树的平的,随便一减就是需要的阶梯。 优化之后貌似速度比树状数组还惊人。 cpp include using namespace std; typedef long long ll; 阅读全文
posted @ 2019-06-17 15:22 韵意 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 区间线段树: cpp const int MAXM=100000; int a[MAXM+5]; ll st[(MAXM 1; st[o 1; build(o 1; if(a=m+1) update(o 1; ll ans=0; if(a=m+1) ans=ans+query(o 1; build( 阅读全文
posted @ 2019-06-17 14:57 韵意 阅读(240) 评论(0) 推荐(0) 编辑
摘要: https://scut.online/p/321 第一次做区间线段树。 感觉和单点的一样啊。pushdown的时候要注意一些问题,st的值有可能是跟区间长度有关的。 cpp include using namespace std; typedef long long ll; inline int 阅读全文
posted @ 2019-06-17 14:56 韵意 阅读(119) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/gym/102222/problem/F 注意到其实用unsigned long long不会溢出。 cpp include using namespace std; typedef long long ll; inline int read() { int 阅读全文
posted @ 2019-06-17 10:18 韵意 阅读(464) 评论(0) 推荐(0) 编辑
摘要: https://codeforc.es/gym/102222/my 好像在哪里见过这个东西?字符的左右移还是小心,注意在mod26范围内。 cpp include using namespace std; typedef long long ll; inline int read() { int x 阅读全文
posted @ 2019-06-17 00:02 韵意 阅读(403) 评论(0) 推荐(0) 编辑