06 2022 档案
摘要:最讨厌模拟题了... #include <iostream> #include <cmath> #include <algorithm> using namespace std; struct node { int x, y; friend bool operator <(const node a,
阅读全文
摘要:比试 这道题用正常的方法一定会超时。 题目要求的是交换数列中所有的x和y,所以我们可以建立一个数组p[x] = y, p[y] = x,输出的时候输出对应的数组值即可 #include <iostream> using namespace std; const int N = 1e5 + 10; i
阅读全文
摘要:将近一年了,又看到这道题,想起来自己在第一次选拔赛是的惊慌失措,堪比坐牢 然而,在做这道题时,我只知道它是一个线段树,是一个不用懒标记的线段树,知道我翻看了题解后才得知它的作法 对于一个数量级为$e^{12}$的数来说,将它开方成1只需要6次即可完成,当一个数为1时,对这个数开方是毫无意义的操作,所
阅读全文
摘要:真的是太菜了 题目中明确告诉了$a_{i+1}$$ - a_i ⇐ \(a_{i+2}\) - \(a_{i+1}\),说明每一项的差值是单调的,所给予时间的时候,如果时间t大于差值最大的那个数,则长度为$$a_n$$ - $$a_1$ + r ,如果在差值范围之间,设第一个大于时间t的差值为j,则
阅读全文