随笔分类 -  Atcoder

摘要:Problem StatementYou are given a string $S$ of length $N$ consisting of 0, 1, and ?. You are also given $Q$ queries $(x_1, c_1), (x_2, c_2), \ldots, ( 阅读全文
posted @ 2022-09-30 18:14 灰鲭鲨 阅读(28) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a sequence $A=(A_1,\ldots,A_N)$ of length $N$. Each element is $0$, $1$, or $2$. Process $Q$ queries in order. Each que 阅读全文
posted @ 2022-09-29 22:37 灰鲭鲨 阅读(75) 评论(0) 推荐(0) 编辑
摘要:Problem StatementIn an $N$-dimensional space, the Manhattan distance $d(x,y)$ between two points $x=(x_1, x_2, \dots, x_N)$ and $y = (y_1, y_2, \dots, 阅读全文
posted @ 2022-09-29 22:25 灰鲭鲨 阅读(35) 评论(0) 推荐(0) 编辑
摘要:Problem StatementTakahashi is at the origin of a two-dimensional plane. Takahashi will repeat teleporting $N$ times. In each teleportation, he makes o 阅读全文
posted @ 2022-09-29 22:13 灰鲭鲨 阅读(136) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere is a sequence $A=(A_0,\ldots,A_{N-1})$ of length $N$. Determine if there exists a tuple of integers $(x,y,z,w)$ that satisfies 阅读全文
posted @ 2022-09-29 18:38 灰鲭鲨 阅读(44) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a grid with $H$ horizontal rows and $W$ vertical columns. $(i, j)$ denotes the square at the $i$-th row from the top and $j$- 阅读全文
posted @ 2022-09-29 18:32 灰鲭鲨 阅读(58) 评论(0) 推荐(0) 编辑
摘要:Problem StatementTakahashi is exploring a cave in a video game. The cave consists of $N$ rooms arranged in a row. The rooms are numbered Room $1,2,\ld 阅读全文
posted @ 2022-09-29 18:30 灰鲭鲨 阅读(49) 评论(0) 推荐(0) 编辑
摘要:Problem StatementA fruit store sells apples. You may perform the following operations as many times as you want in any order: Buy one apple for $X$ ye 阅读全文
posted @ 2022-09-29 18:27 灰鲭鲨 阅读(69) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given an integer sequence of length $N$: $A=(A_1,A_2,\ldots,A_N)$. You will perform the following consecutive operations just 阅读全文
posted @ 2022-09-27 21:53 灰鲭鲨 阅读(80) 评论(0) 推荐(0) 编辑
摘要:NotesFor two integer sequences of the same length $A_1,A_2,\dots,A_N$ and $B_1,B_2,\dots,B_N$, $A$ is said to be lexicographically earlier than $B$ if 阅读全文
posted @ 2022-09-27 21:41 灰鲭鲨 阅读(43) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are $N$ people, called Person $1$, Person $2$, $\ldots$, Person $N$. The parent of Person $i$ $(2 \le i \le N)$ is Person $P_i$ 阅读全文
posted @ 2022-09-27 21:37 灰鲭鲨 阅读(184) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have five cards with integers $A$, $B$, $C$, $D$, and $E$ written on them, one on each card. This set of five cards is called a Fu 阅读全文
posted @ 2022-09-27 21:35 灰鲭鲨 阅读(135) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are $N$ squares called Square $1$ though Square $N$. You start on Square $1$. Each of the squares from Square $1$ through Squar 阅读全文
posted @ 2022-09-12 22:19 灰鲭鲨 阅读(45) 评论(0) 推荐(1) 编辑
摘要:Problem StatementThere are integers with $N$ different values written on a blackboard. The $i$-th value is $A_i$ and is written $B_i$ times. You may r 阅读全文
posted @ 2022-09-12 22:02 灰鲭鲨 阅读(46) 评论(0) 推荐(0) 编辑
摘要:Problem Statement$2^N$ people, numbered $1$ to $2^N$, will participate in a rock-paper-scissors tournament. The tournament proceeds as follows: The pa 阅读全文
posted @ 2022-09-12 21:58 灰鲭鲨 阅读(117) 评论(0) 推荐(0) 编辑
摘要:Problem StatementA sport event is held in June of every year whose remainder when divided by $4$ is $2$. Suppose that it is now January of the year $Y 阅读全文
posted @ 2022-09-11 18:07 灰鲭鲨 阅读(122) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere is an empty sequence $X$ and an empty stack $S$. Also, you are given an integer sequence $A=(a_1,\ldots,a_N)$ of length $N$. Fo 阅读全文
posted @ 2022-09-11 18:06 灰鲭鲨 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a simple undirected graph with $N$ vertices and $M$ edges. The vertices are numbered $1, \dots, N$, and the $i$-th $(1 阅读全文
posted @ 2022-09-10 11:44 灰鲭鲨 阅读(76) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a sequence $a = (a_1, \dots, a_N)$ of length $N$ consisting of integers between $1$ and $N$. Find the number of pairs o 阅读全文
posted @ 2022-09-10 11:05 灰鲭鲨 阅读(121) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a sequence of positive integers $A=(a_1,\ldots,a_N)$ of length $N$. There are $(2^N-1)$ ways to choose one or more term 阅读全文
posted @ 2022-09-10 09:38 灰鲭鲨 阅读(30) 评论(0) 推荐(0) 编辑