摘要: CF1530D Secret Santa 给你一个序列 \(a\),满足 \(a_i\neq i\),每次操作可以将任意位置上的数改为 \([1,n]\) 上的数,求将此序列变为一个 \(1\sim n\) 的排列且 \(a_i\neq i\) 的最小操作次数,输出一种方案。 \(n\le 2\ti 阅读全文
posted @ 2024-09-26 17:35 view3937 阅读(19) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2024-09-19 14:42 view3937 阅读(3) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2024-09-14 18:13 view3937 阅读(0) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2024-09-07 17:10 view3937 阅读(0) 评论(0) 推荐(0)
摘要: Hello World! 阅读全文
posted @ 2024-08-21 21:28 view3937 阅读(0) 评论(0) 推荐(0)
摘要: aewgsehrehrehreherhhjnrtjtrjuretsegdfh 阅读全文
posted @ 2024-08-20 17:11 view3937 阅读(12) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2024-08-19 19:31 view3937 阅读(2) 评论(0) 推荐(0)
摘要: A - Primary Task 给一个数 \(x\le 10000\),判断其是否形如 \(\overline{ab}\) 满足 \(a=10,b\ge 2\) 且无前导零。 模拟判断即可。 code #include<bits/stdc++.h> using namespace std; con 阅读全文
posted @ 2024-08-14 17:26 view3937 阅读(158) 评论(0) 推荐(0)
摘要: 点分治 以树的重心为根,对子树内的问题分治求解,时间复杂度可以做到 \(O(n\log n\times F(n))\),其中 \(F(n)\) 是解决经过根的问题所需要的处理。 P3806 模板 给一棵有边权的树,多次询问树上是否存在距离为 \(k\) 的点对。 \(n\le 10^4,m\le 1 阅读全文
posted @ 2024-08-14 15:08 view3937 阅读(18) 评论(0) 推荐(0)
摘要: After printing a query do not forget to output the end of line and flush the output. Otherwise, you may get Idleness limit exceeded verdict. To do this, use: fflush(stdout) or cout.flush() in C++; System.out.flush() in Java; flush(output) in Pascal; stdout.flush() in Python; see the documentation for other languages. 阅读全文
posted @ 2024-08-12 21:02 view3937 阅读(82) 评论(0) 推荐(0)
Title