上一页 1 2 3 4 5 6 7 8 9 10 ··· 66 下一页
摘要: [POI 2007] ZAP-Queries 题目描述 密码学家正在尝试破解一种叫 BSA 的密码。 他发现,在破解一条消息的同时,他还需要回答这样一种问题: 给出 $a,b,d$,求满足 $1 \leq x \leq a$,$1 \leq y \leq b$,且 $\gcd(x,y)=d$ 的二元 阅读全文
posted @ 2025-07-26 10:15 onlyblues 阅读(38) 评论(0) 推荐(0)
摘要: 小王的工作任务分配(hard ver.) 题目描述 (本题 easy 和 hard 的区别在于,hard ver. 内存限制变小,easy ver. 没有 opt = 1) 每组数据集合涵盖一个长度为 $n$ 的项目难度数组 $a$(数组元素下标从 $1$ 起有序编排),以及 $m$ 条操作指令。操 阅读全文
posted @ 2025-07-19 19:43 onlyblues 阅读(30) 评论(0) 推荐(0)
摘要: 小红的双排列期望(hard) 题目描述 本题为问题的困难版本,两题的唯一区别在于操作失败的代价。 小红拿到了一个长度为 $2 \times n$ 的数组 $\{a_1,a_2,\dots,a_{2\times n}\}$,初始所有元素都是 $0$,她可以进行任意次以下操作: $\hspace{23p 阅读全文
posted @ 2025-07-15 10:37 onlyblues 阅读(51) 评论(0) 推荐(0)
摘要: D. Token Removing Define a sequence of integers $a$ valid if and only if $\forall 1 \le i \le n, 0 \le a_i \le i$. Define the weight $f(a)$ of a valid 阅读全文
posted @ 2025-07-12 12:13 onlyblues 阅读(59) 评论(0) 推荐(0)
摘要: Count the Number of Arrays with K Matching Adjacent Elements You are given three integers n, m, k. A good array arr of size n is defined as follows: E 阅读全文
posted @ 2025-06-20 22:01 onlyblues 阅读(107) 评论(0) 推荐(0)
摘要: 袋鼠将军大冒险 (hard version) 题目描述 本题为问题的困难版本,两题的唯一区别在于询问的次数限制。在困难版本中,询问次数不多于 $10^5$ 次。 在环扎阿越王国中有 $n$ 个岛屿,岛屿之间一共存在 $n - 1$ 条双向道路连接。保证任意一条道路连接两个不同的岛屿,任意两个岛屿之间 阅读全文
posted @ 2025-06-10 20:21 onlyblues 阅读(58) 评论(0) 推荐(0)
摘要: F. Small Operations Given an integer $x$ and an integer $k$. In one operation, you can perform one of two actions: choose an integer $1 \le a \le k$ a 阅读全文
posted @ 2025-05-27 21:41 onlyblues 阅读(88) 评论(0) 推荐(0)
摘要: G. Build an Array Yesterday, Dima found an empty array and decided to add some integers to it. He can perform the following operation an unlimited num 阅读全文
posted @ 2025-05-27 21:41 onlyblues 阅读(95) 评论(0) 推荐(0)
摘要: Binary Banter: Counting Combinatorial Bits Problem Description Given a positive integer $n$, compute the value of the following expression modulo $998 阅读全文
posted @ 2025-05-25 19:35 onlyblues 阅读(54) 评论(0) 推荐(0)
摘要: 树到云端 给定一棵边权为 $1$,由 $n$ 个节点构成的树,第 $i$ 个点的点权为 $\text{val}_i$,设 $\text{dis}(i,j)$ 表示点 $i$ 到点 $j$ 的最短距离(特别地,$\text{dis}(i,i) = 0$),记 $t_i = \sum\limits_{j 阅读全文
posted @ 2025-05-24 17:56 onlyblues 阅读(38) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 66 下一页
Web Analytics