摘要: Here list some of the public problems set by me. Those extremely easy problems might not be included here. Format: # ID / When / Problem Name / Where 阅读全文
posted @ 2023-10-05 23:55 Claris 阅读(397) 评论(0) 推荐(2) 编辑
摘要: 菜鸡队训练实录。 现场赛记录:[名称:奖项/排名] 2017: ICPC Shenyang:Gold/3 CCPC Hangzhou:Gold/3 ICPC Beijing:Gold/13 CCPC Final:Silver/22 ICPC Asia East Continent League Fi 阅读全文
posted @ 2017-09-12 02:39 Claris 阅读(11247) 评论(4) 推荐(4) 编辑
摘要: 菜鸡队训练实录。 现场赛记录:[名称:奖项/排名] 2016: ZJPSC:Gold/1 CCPC中南邀请赛:Gold/1 ICPC Dalian:Gold/24 ICPC Beijing:Gold/9 CCPC Final:Bronze/40 ICPC China-Final:Gold/12 20 阅读全文
posted @ 2016-10-21 18:17 Claris 阅读(7021) 评论(4) 推荐(6) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2023hangzhou_tutorials-2-22.pdf Code: A. Submissions #include <bits/stdc++.h> using namespace std; using Su 阅读全文
posted @ 2024-02-25 20:07 Claris 阅读(53) 评论(0) 推荐(1) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2023Guilin_Tutorial.pdf Code: A. Easy Diameter Problem #include<bits/stdc++.h> using namespace std; const i 阅读全文
posted @ 2023-12-17 22:33 Claris 阅读(38) 评论(0) 推荐(0) 编辑
摘要: Kolorowy wąż (kol) 用栈从蛇尾到蛇头记录每一段身体的颜色,每次蛇头变化都认为是新长出了一个蛇头。 对于每个坐标,记录它最后一次是被哪个蛇头经过的,那么根据蛇头版本的差值可以得到对应蛇身相对于蛇头的名次,然后即可在栈中找到对应的颜色。 每次操作的时间复杂度为$O(1)$。 #incl 阅读全文
posted @ 2023-10-30 00:07 Claris 阅读(61) 评论(0) 推荐(0) 编辑
摘要: 对于一个周期长度$p$来说,如果它不是$S_k$的周期,那么它一定不是$S_{k+1}$的周期,因此可以二分出分界线$t_p$满足它是$S_p,S_{p+1},S_{p+2},\dots,S_{t_p}$的周期,但不是$S_{t_p+1}$的周期。对于一个询问$(k,l,r)$,问题等价于寻找区间中 阅读全文
posted @ 2023-10-05 01:48 Claris 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 离线询问,建立时间线段树,那么每条直线存在的时间是一个区间,对应时间线段树上$\mathcal{O}(\log n)$个节点,每个询问对应时间线段树上某个叶子到根的$\mathcal{O}(\log n)$个节点。 对于时间线段树中的某个节点,它代表的直线集合是静态的,问题转化为静态区间查询。对于静 阅读全文
posted @ 2023-10-05 01:47 Claris 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/CCPC-Online-2023-%E9%A2%98%E8%A7%A3.pdf Code: A. Almost Prefix Concatenation #include<cstdio> #include<cstr 阅读全文
posted @ 2023-10-05 01:41 Claris 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2023HDU%E7%AC%AC%E4%B8%89%E5%9C%BA%E9%A2%98%E8%A7%A3.pdf Code: A. Magma Cave #include<iostream> #include<al 阅读全文
posted @ 2023-10-05 01:19 Claris 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2023_ZJCPC_Tutorial.pdf Code: A. Look and Say #include<bits/stdc++.h> using namespace std; int main() { ios 阅读全文
posted @ 2023-10-05 00:58 Claris 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2022Hong_Kong_Tutorial.pdf Code: A. TreeScript #include <bits/stdc++.h> using namespace std; using LL = lon 阅读全文
posted @ 2023-10-05 00:38 Claris 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2022ICPCHangzhouTutorial.pdf Code: A. Modulo Ruins the Legend #include<bits/stdc++.h> using namespace std; 阅读全文
posted @ 2023-10-05 00:26 Claris 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 建立$n+m$个点的无向图,其中$n$个点表示输入的数列,$m$个点表示答案的$m$个二进制位。 对于输入的两个数$a[i],a[j]$,若它们存在公共二进制位,则可以通过同时选某一公共位来对答案贡献$0$,并完成两个数的选择,因此在数$i$和数$j$之间连边,边权为二维权值$(2,0)$。 对于输 阅读全文
posted @ 2022-12-12 22:09 Claris 阅读(182) 评论(0) 推荐(1) 编辑
摘要: Trial Round: Tulips 按题意模拟。 #include<cstdio> const int N=15000; int n,ans=N,x,v[N+1]; int main(){ scanf("%d",&n); while(n--){ scanf("%d",&x); if(!v[x]) 阅读全文
posted @ 2022-10-16 17:26 Claris 阅读(136) 评论(0) 推荐(1) 编辑
摘要: A. Equipment Upgrade 设$E_i$表示从等级$i$强化至等级$n$的期望花费,则有\begin{eqnarray*}E_n&=&0\\E_i&=&c_i+p_i\cdot E_{i+1}+\frac{\left(1-p_i\right)}{\sum_{j=1}^i w_j}\cd 阅读全文
posted @ 2022-07-26 23:23 Claris 阅读(341) 评论(0) 推荐(2) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2022ZJCPC%E5%88%86%E6%9E%90.zip Code: A. JB Loves Math #include<cmath> #include<cstdio> #include<cstring> # 阅读全文
posted @ 2022-05-09 15:14 Claris 阅读(497) 评论(0) 推荐(1) 编辑
摘要: Trial Round: Rectangles \[ans=\sum_{1\leq i\leq j\leq n}[ij\leq n]=\frac{\lfloor\sqrt{n}\rfloor+\sum_{1\leq i,j\leq n}[ij\leq n]}{2}=\frac{\lfloor\sqr 阅读全文
posted @ 2022-01-25 21:38 Claris 阅读(237) 评论(0) 推荐(1) 编辑
摘要: Trial Round: Rectangles 枚举子矩阵的长和宽,乘以对应的子矩形数。 时间复杂度$O(nm)$。 #include<cstdio> int n,m,p,i,j,ans; int main(){ scanf("%d%d%d",&n,&m,&p); for(i=1;i<=n;i++) 阅读全文
posted @ 2022-01-19 23:27 Claris 阅读(186) 评论(0) 推荐(1) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2021CCPCguilin.zip Code: A. A Hero Named Magnus #include <bits/stdc++.h> #define pb push_back #define mp ma 阅读全文
posted @ 2022-01-14 22:57 Claris 阅读(330) 评论(0) 推荐(0) 编辑
摘要: A. 公交线路 检查坐对方向和坐反方向两种情况对应的报站序列是否符合输入,如果都符合那就是''Unsure'',否则可以确定有没有坐反。 #include<cstdio> const int N=15; int n,m,S,T,i,A,B,a[N],b[N]; bool check(int d){ 阅读全文
posted @ 2022-01-14 22:52 Claris 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 题解: https://files.cnblogs.com/files/clrs97/2020icpc-macau-analyze.zip Code: A. Accelerator #include<cstdio> #include<vector> using namespace std; type 阅读全文
posted @ 2022-01-14 21:51 Claris 阅读(153) 评论(0) 推荐(0) 编辑