随笔分类 -  Atcoder

摘要:Problem StatementFor a sequence of length $N$, $A = (A_1,A_2,\dots,A_N)$, consisting of integers between $1$ and $N$, inclusive, and an integer $i\ (1 阅读全文
posted @ 2023-01-09 10:12 灰鲭鲨 阅读(31) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThis is an interactive task (where your program interacts with the judge's program via Standard Input and Output). You are given inte 阅读全文
posted @ 2023-01-07 12:11 灰鲭鲨 阅读(45) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere is a grid with $1 \times N$ squares, numbered $1,2,\dots,N$ from left to right. Takahashi prepared paints of $C$ colors and pai 阅读全文
posted @ 2023-01-07 11:53 灰鲭鲨 阅读(37) 评论(0) 推荐(0) 编辑
摘要:Problem StatementTakahashi Elementary School has $N$ new students. For $i = 1, 2, \ldots, N$, the name of the $i$-th new student is $S_i$ (which is a 阅读全文
posted @ 2023-01-04 17:08 灰鲭鲨 阅读(29) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a sequence $A=(A_1,A_2,\dots,A_N)$ of length $N$ consisting of positive integers, where the elements of $A$ are distinc 阅读全文
posted @ 2023-01-04 16:49 灰鲭鲨 阅读(23) 评论(0) 推荐(0) 编辑
摘要:Problem StatementFind the sum of popcounts of all integers between $1$ and $N$, inclusive, such that the remainder when divided by $M$ equals $R$. Her 阅读全文
posted @ 2023-01-04 16:23 灰鲭鲨 阅读(20) 评论(0) 推荐(0) 编辑
摘要:Problem StatementGiven is a permutation $P=(P_1,P_2,\ldots,P_N)$ of $1,2,\ldots,N$, and an integer $X$. Additionally, $Q$ queries are given. The $i$-t 阅读全文
posted @ 2023-01-04 11:23 灰鲭鲨 阅读(48) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere is a $N \times N$ grid, with blocks on some squares. The grid is described by $N$ strings $S_1,S_2,\dots,S_N$, as follows. If t 阅读全文
posted @ 2023-01-03 20:50 灰鲭鲨 阅读(29) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given two sequences of integers of length $N$: $A = (A_1, A_2, \ldots, A_N)$ and $B = (B_1, B_2, \ldots, B_N)$. Print the num 阅读全文
posted @ 2023-01-03 17:09 灰鲭鲨 阅读(53) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThis is an interactive task, where your and the judge's programs interact via Standard Input and Output. You and the judge will follo 阅读全文
posted @ 2023-01-03 16:45 灰鲭鲨 阅读(41) 评论(0) 推荐(0) 编辑
摘要:Problem StatementA box contains $N$ balls, each with an integer between $1$ and $M-1$ written on it. For $i = 1, 2, \ldots, N$, the integer written on 阅读全文
posted @ 2023-01-03 16:37 灰鲭鲨 阅读(62) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a directed graph with $N$ vertices, called Vertex $1$, Vertex $2$, $\ldots$, Vertex $N$. For each pair of integers such that 阅读全文
posted @ 2023-01-02 20:24 灰鲭鲨 阅读(126) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given an undirected tree with $N$ vertices. Let us call the vertices Vertex $1$, Vertex $2$, $\ldots$, Vertex $N$. For each $ 阅读全文
posted @ 2023-01-02 19:59 灰鲭鲨 阅读(38) 评论(0) 推荐(0) 编辑
摘要:Problem StatementTakahashi has $A$ apple seedlings, $B$ banana seedlings, and $C$ cherry seedlings. Seedlings of the same kind cannot be distinguished 阅读全文
posted @ 2023-01-02 17:25 灰鲭鲨 阅读(37) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a grid with $H$ rows and $W$ columns. Each square is painted either white or black. For each integer pair $(i, j)$ such that 阅读全文
posted @ 2022-12-23 20:53 灰鲭鲨 阅读(35) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a rooted tree with $N$ vertices numbered $1,2,\dots,N$. The tree is rooted at Vertex $1$, and the parent of Vertex $i \ge 2$ 阅读全文
posted @ 2022-12-23 20:46 灰鲭鲨 阅读(35) 评论(0) 推荐(0) 编辑
摘要:Problem StatementIn a string fair, they determine the beauty of a non-empty string $S$ consisting of lowercase English letters. The beauty of string $ 阅读全文
posted @ 2022-12-23 20:14 灰鲭鲨 阅读(26) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given an integer sequence $A = (A_1, \dots, A_N)$ of length $N$. Find the number, modulo $998244353$, of permutations $P = (P 阅读全文
posted @ 2022-12-23 17:05 灰鲭鲨 阅读(32) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a tree with $N$ vertices. The vertices are numbered $1, \dots, N$, and the $i$-th ($1 \leq i \leq N - 1$) edge connects 阅读全文
posted @ 2022-12-23 16:52 灰鲭鲨 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Problem StatementA teacher has a hidden permutation $P=(P_1,P_2,\ldots,P_N)$ of $(1,2,\cdots,N)$. You are going to determine it. To do this, you prepa 阅读全文
posted @ 2022-12-22 16:02 灰鲭鲨 阅读(32) 评论(0) 推荐(0) 编辑