题目链接:https://codeforces.com/problemset/problem/1114/F 题目大意:给你n个数,q次操作,类型1,将区间[l,r]中每个数乘以x,类型2,询问$\varphi (\prod_{i=l}^{r}a_i)$。其中初始的n个数每个小于等于300,x<=30 ...
分类:
其他好文 时间:
2020-07-12 19:09:23
阅读次数:
52
You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number ...
分类:
其他好文 时间:
2020-07-12 18:48:43
阅读次数:
50
https://codingcompetitions.withgoogle.com/kickstart/round/000000000019ff08/0000000000386d5c (第一题ac,第二题ac,第三题,小数据集能ac,第四题,小数据集能ac) 第一题: Problem Isyana ...
分类:
其他好文 时间:
2020-07-12 17:08:21
阅读次数:
114
##题面 Problem Description Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our dai ...
分类:
其他好文 时间:
2020-07-12 17:05:48
阅读次数:
132
题目链接:https://www.acwing.com/problem/content/219/ 题目给出一张有向无环图,要求从1到n的路径长度的数学期望,如果一个点有k条出边,那么走每条表的概率都是1/k,我们容易知道,记一个点x到终点n的路径的数学期望是dis[x],那么dis[x]计算的结果依 ...
分类:
编程语言 时间:
2020-07-12 16:57:52
阅读次数:
64
##题面 Problem Description Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x ...
分类:
其他好文 时间:
2020-07-12 16:40:31
阅读次数:
59
Danny, the local Math Maniac, is fascinated by circles, Omkar's most recent creation. Help him solve this circle problem! You are given \(n\) nonnegat ...
分类:
其他好文 时间:
2020-07-12 10:23:13
阅读次数:
122
##题意 传送门 一个无限长数轴,初始数轴上每个坐标上的数都是$0$, 共$n$个操作,每个操作将数轴某一位置上的数加$c$, $m$个询问,询问区间$[ l , r ]$上所有数的和 ###数据范围 \(\begin{array}{l}-10^{9} \leq x \leq 10^{9} \\ 1 ...
分类:
其他好文 时间:
2020-07-12 00:53:14
阅读次数:
85
https://atcoder.jp/contests/abc157/tasks/abc157_f 大意:平面上有n个饼,每个饼有一个属性ci。一个饼的烤熟时间为到火源的欧几里得距离乘以ci。求在适当的位置放置一个火源后让至少k个饼烤熟的最短时间 正解:计算几何+二分答案 但是我正在学习模拟退火所以 ...
分类:
其他好文 时间:
2020-07-11 19:41:49
阅读次数:
58
E. K-periodic Garland 题意 给出一个长度为 n 的 01 串,现在规定一个串如果相邻两个 1 的位置相隔为 k ,那么这个串就是好串,现在你可以将某个位置的字符翻转,问最少需要多少次可以把这个串变成一个好串? 思路 本来是练习DP的,但是想着想着跑偏了。 好串格式应该是0000 ...
分类:
其他好文 时间:
2020-07-11 19:33:40
阅读次数:
40