原题链接:https://codeforces.com/contest/2006/problem/B (D1 的 B 题,D2 的 E 题) 因赛时想复杂了没做出来导致渡劫失败 ( $1859 \rightarrow 1891$ ),赛后补了一下发现竟然比 D 还好写 QwQ 题目大意 给定一个根为 $1$ ,且编号满足 DFS 序的树,令 $\o…
原题链接: https://codeforces.com/contest/1999/problem/G1 (Easy Ver, 可查询 10 次) https://codeforces.com/contest/1999/problem/G2 (Hard Ver) 题目大意 我们有一把尺子,但是中间缺少了一个数字 $x (2\leq x\leq 99…
原题链接:https://codeforces.com/gym/105161/problem/D 题目大意 给定一个 n 行 n 列 (3\leq n\leq 100) 的网格,从上到下,从左到右将行列依次编号为 1 到 n,初始每个单元格中的值均为 −1。你需要给单元格赋值,每轮你可以选择一个单元格,考虑与其四连通(上下左右)的单元格(不包括你选…
题目概览 描述 There are n players sitting at a round table. All of them have s cards of n colors in total. Besides, initially the first person had cards of only the first color, the…
题目概览 描述 Shakespeare is a widely known esoteric programming language in which programs look like plays by Shakespeare, and numbers are given by combinations of ornate epithets.…
题目概览 描述 One day Anna got the following task at school: to arrange several numbers in a circle so that any two neighboring numbers differs exactly by 1. Anna was given several …
问题 Problem Statement 给出一个长度为 N 的序列 A ,其由 1 到 \textbf{10} 之间的整数组成。 如果满足以下条件,那么三元组 (l,r) ( 1\leq l \leq r\leq N )是“好数对”: 序列 (A_l,A_{l+1},\ldots,A_r) 包含长度为 3 的等差子序列。换言之,存在整数对 (i,…
问题 Problem Statement AtCoder 群岛由 N 座岛屿组成,这些岛屿由 N 座桥梁连接,其编号从 1 到 N ,i(1\leq i\leq N-1)号桥双向连接 i 和 i+1 岛,而 N 号桥双向连接 N 和 1 岛。在各个岛屿之间只能靠桥梁通行。 在这些岛屿上,经常会有从 X_1 岛出发,依次游览 X_2, X_3, \d…
题目 Problem Statement 有一个大小为 H 行 W 列的网格。令 (i, j) 表示第 i 行第 j 列的单元格。 每个单元格包含一个字符 o、x 或 .。其由 H 个长度为 W 的字符串 S_1, S_2, \ldots, S_H 表示,单元格 (i, j) 中的字符是字符串 S_i 中的 j 个字符。 对于此网格,您可以重复进行…