上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页
摘要: Description Link. \(n\) distinct integers \(x_1,x_2,\ldots,x_n\) are written on the board. Nezzar can perform the following operation multiple times. 阅读全文
posted @ 2021-05-10 14:20 cirnovsky 阅读(75) 评论(0) 推荐(0) 编辑
摘要: Description Link. 给定长度为 \(n\) 的序列 \(a_1, a_2, \dots, a_n\);共 \(m\) 组询问,每次询问给出 \(d,p_1,p_2\),求 \(\sum_{i=0}^{d-1} \sum_{j=0}^{d-1} \sum_{k=0}^{d-1} a_{ 阅读全文
posted @ 2021-05-09 10:13 cirnovsky 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 「CF 1520A」Do Not Be Distracted! Link. 模拟。 #include<bits/stdc++.h> char now; char get_char(){char res=getchar();while(res<'A' || res>'Z') res=getchar() 阅读全文
posted @ 2021-05-09 08:58 cirnovsky 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Description Link. 修改边权的动态 MST。 Solution 讲清楚点。 修改边权的 MST,考虑对时间分治。设我们当前操作的操作区间是 \([l,r]\),直接暴力找 MST 是不行的。 考虑找出必要的边和必不要的边。 若把 \([l,r]\) 操作中的边边权改成 \(+\inf 阅读全文
posted @ 2021-05-05 11:23 cirnovsky 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Description Link. 一共 \(n\) 天,每天可以卖出或者买入两种股票 \(A\) 和 \(B\)。这两种股票在第 \(i\) 天的价值为 \(A_i\) 和 \(B_i\)。 每天可以花所有的现金买入股票,这些股票中 \(A\) 股与 \(B\) 股的数量比为 \(rate_i\) 阅读全文
posted @ 2021-05-05 09:26 cirnovsky 阅读(42) 评论(0) 推荐(0) 编辑
摘要: Description Link. 求 \(\sum\limits_{i=1}^n\sum\limits_{j=1}^n(i+j)^kf(\gcd(i,j))\gcd(i,j)\)。 Solution \[ \begin{aligned} \textbf{ANS}&=\sum_{i=1}^{n}\s 阅读全文
posted @ 2021-04-23 14:03 cirnovsky 阅读(43) 评论(0) 推荐(0) 编辑
摘要: Description Link. 起床困难综合症 上树。 Solution 线段树维护,树剖上树。 具体题解有空再写,我要去睡觉了。 #include<bits/stdc++.h> typedef unsigned long long ULL; struct node { ULL one,zero 阅读全文
posted @ 2021-04-16 21:41 cirnovsky 阅读(70) 评论(0) 推荐(0) 编辑
摘要: Day -1 Thu. & Fri. 恰逢学校运动会,于是向班主任申请了不去,然后就在机房坐着。不美好的事情可能就是文化课老师还留了这两天的作业,不过-> 一旦放弃了作业,什么都好说了呢! 于是就在机房里面挑往年联考题,基本上就是在自闭中度过。 途中没有什么有意思的事情。然后就 LY & 我 & N 阅读全文
posted @ 2021-04-09 13:29 cirnovsky 阅读(104) 评论(0) 推荐(1) 编辑
摘要: 本文差不多算是翻译了一遍 CF blog?id=45223 就是抄了一遍,看不懂可以去原文。 当然我的翻译并不是完全遵从原文的。 Part. 1 Introduction 平时我们怎么求高维前缀和?容斥对吧,复杂度多少?\(\mathcal{O}(n^{d}\times2^{d})\)(\(n\) 阅读全文
posted @ 2021-04-09 12:45 cirnovsky 阅读(97) 评论(0) 推荐(0) 编辑
摘要: Description Link. 给出一个带权无向图,边权为 \(2^{a}\cdot3^{b}\) 形式。 给出 \(q\) 组形如 \(u,v,a,b\) 的询问,问 \(u,v\) 中是否存在一条路径使得其边权之 \(\text{lcm}\) 为 \(2^{a}\cdot3^{b}\)。 S 阅读全文
posted @ 2021-04-09 11:22 cirnovsky 阅读(52) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页