上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页
该文被密码保护。 阅读全文
posted @ 2021-07-24 12:31 purinliang 阅读(0) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2021-06-04 21:38 purinliang 阅读(0) 评论(0) 推荐(0) 编辑
摘要: /* MOD must be a prime. if not, don't use inv() */ const int MOD = 1e9 + 7; struct ModularIntegers { #define mint ModularIntegers int num; mint() { nu 阅读全文
posted @ 2021-06-01 20:49 purinliang 阅读(81) 评论(0) 推荐(0) 编辑
摘要: const int MAXN = 2e5 + 10; int a[MAXN]; int val[MAXN]; #define mid ((l + r)>>1) int L[MAXN << 5]; int R[MAXN << 5]; int cnt[MAXN << 5]; ll sum[MAXN << 阅读全文
posted @ 2021-04-10 01:53 purinliang 阅读(58) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/gym/102900/problem/C 找数对(x,y),他们的二进制位与的结果一定是0,然后他们的贡献就是他们位或的msb的长度+1。 状态为dp[dep][xlim][ylim][lzero]表示长度为dep的数对,x限制为xlim,y限制为yli 阅读全文
posted @ 2021-04-09 14:12 purinliang 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 一种节约空间的内存写法: static constexpr int calc_segment_tree_size (int n) { int res = 1; while (res < (n << 1)) { res <<= 1; } return res; } static constexpr i 阅读全文
posted @ 2021-04-05 12:50 purinliang 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 整个大学生活,除了XCPC真的几乎什么都不剩下了,可能唯一剩下的是2020年6月到9月趁着疫情学校不组织集训,摸鱼去腾讯参加了一段时间的实习吧。从2017年底加入以来,没有寒暑假,国庆节什么的也都大大缩水了,最摸鱼的那段时间是2020年疫情期间吧。这篇文章记录我大学期间的XCPC经历。 成绩 这一站 阅读全文
posted @ 2021-04-05 06:17 purinliang 阅读(1310) 评论(0) 推荐(1) 编辑
摘要: 退役记 整个XCPC,从2017年10月买了第一本书《挑战程序设计竞赛》开始,一直学到参加2021年4月ICPC昆明站为止,历时3.5年的超长XCPC生涯终于结束了。整个大学生活除了XCPC真的几乎什么都不剩下了(可能唯一是2020年6月到9月摸鱼去腾讯参加了一段实习吧)。在退役的一场拿到了第一个也 阅读全文
posted @ 2021-04-04 12:40 purinliang 阅读(864) 评论(0) 推荐(0) 编辑
摘要: https://codeforces.com/contest/1923/problem/E 这一道题有三种不一样的写法,有一种是用启发式合并(跟树上没啥关系)去优化dp的做法。 int n, k; int c[200005]; vector<int> G[200005]; ll ans; map<i 阅读全文
posted @ 2021-03-16 18:33 purinliang 阅读(86) 评论(0) 推荐(0) 编辑
摘要: CF375D - Tree and Queries 题意:给定一棵 \(n(2\leq n\leq 10^5)\) 个结点的树,根结点为 \(1\) 号结点,每个结点有颜色 \(c(\leq c\leq 10^5)\) 。然后 \(m(1\leq m\leq 10^5)\) 次询问,每次询问给两个参 阅读全文
posted @ 2021-03-16 17:27 purinliang 阅读(185) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页