随笔分类 - 算法-差分
摘要:题目 The cows are hard at work trying to invent interesting new games to play. One of their current endeavors involves a set of \(N\) intervals (\(1\le
阅读全文
摘要:题目链接 题目 Define the distance between two strings of the same length as the numbers of the positions where the characters differ in these two strings. I
阅读全文
摘要:题目链接 我要是在noip前做这道题就好了。 这道题的本质就是noip2021方差中的一个性质,对于每个数进行修改,就是把它左右的差进行交换。 注意的是首项一定要一样。 Code // Problem: CF1110E Magic Stones // Contest: Luogu // URL: h
阅读全文
摘要:题目链接 Part A 式子化简 首先题目要求的式子就是 \(n^2\) 乘上 \(\frac{1}{n}\sum_{i=1}^n(a_i-\bar a)^2\),其中 \(\bar a=\frac{1}{n}\sum_{i=1}^n a_i\)。 我们把这三合在一起也就是: \(n^2\times
阅读全文

浙公网安备 33010602011771号