题目链接: https://www.luogu.com.cn/problem/P6144 题意: 已经描述的很清楚了,略。 题解: 考虑 \(K=1\) 时的做法: 此时如果沿用 G 组该题的简单做法,是行不通的。 不过仍然是类似的做法,以每个区间结尾的贡献的和。 考虑区间 \([l,r]\) : ...
分类:
其他好文 时间:
2021-02-17 14:07:20
阅读次数:
0
Problem A Right-Coupled Numbers 留坑。 Problem B Make Numbers 留坑。 Problem C Pyramid 留坑。 Problem D Quality Monitoring 留坑。 Problem E A Color Game 留坑。 Probl ...
分类:
其他好文 时间:
2021-02-16 12:17:48
阅读次数:
0
Problem Description Due to the increase in the number of students of Berland State University it was decided to equip a new computer room. You were gi ...
分类:
其他好文 时间:
2021-02-16 12:07:01
阅读次数:
0
正题 题目链接:https://www.luogu.com.cn/problem/AT4995 题目大意 $n$个点的一棵树,上面有一些棋子,每次可以选择两个棋子移动到他们之间的路径上相邻的点上,求最少多少步能移动到一个点上。 \(n\in[1,2000]\) 解题思路 如果固定最终节点的话,这个节 ...
分类:
其他好文 时间:
2021-02-16 12:00:16
阅读次数:
0
给定一个数组,每次操作可以把任意一个元素 +1 或者 -1。求使得递增的最小操作次数。 n<=3000 ...
分类:
其他好文 时间:
2021-02-16 11:54:21
阅读次数:
0
地址 https://pintia.cn/problem-sets/994805342720868352/problems/994805502658068480 主要是模拟 题意比较绕。 题目大意是 接受各个学生的三门成绩 C M E, 然后四舍五入计算出平均成绩A 在 接受询问的学生的id后 打印 ...
分类:
其他好文 时间:
2021-02-16 11:53:57
阅读次数:
0
CF1480A Yet Another String Game Problem 给出一个字符串,两人轮流操作,每次操作可以将一个字符改为另外一个字符,当不可以不改动,先手目标是让最终字符串字典序最小,后手目标相反,求最终字符串。 Sol 贪心地模拟即可。 #define in read() int ...
分类:
其他好文 时间:
2021-02-15 12:23:09
阅读次数:
0
https://codeforces.com/contest/1473/problem/E vector存图: 1 #define bug(x) cout<<#x<<" is "<<x<<endl 2 #define IO std::ios::sync_with_stdio(0),cin.tie(0 ...
分类:
其他好文 时间:
2021-02-15 12:17:20
阅读次数:
0
题目链接:https://acm.ecnu.edu.cn/contest/354/problem/A/ 原做法:树上倍增+lca,可能生成树的时候复杂度太高,用的是类似并查集的合并方式。 oj上的大佬:https://acm.ecnu.edu.cn/contest/354/submission/22 ...
分类:
其他好文 时间:
2021-02-15 12:10:05
阅读次数:
0
正题 题目链接:https://www.luogu.com.cn/problem/AT3949 题目大意 长度为$L$的坐标轴上,给出$n$个点,每个点$x_i$需要购物$t_i$的时间,一辆车在$0\sim L$折返跑,求从$0$出发购物完回到$0$的最短时间。 \(n\in[1,3\times ...
分类:
其他好文 时间:
2021-02-15 11:59:49
阅读次数:
0