随笔分类 -  Atcoder

摘要:Problem StatementThere is an $N \times M$ grid, where the square at the $i$-th row from the top and $j$-th column from the left has a non-negative int 阅读全文
posted @ 2023-07-25 19:20 灰鲭鲨 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are $N$ Takahashi. The $i$-th Takahashi has an integer $A_i$ and $B_i$ balls. An integer $x$ between $1$ and $K$, inclusive, wi 阅读全文
posted @ 2023-07-22 13:59 灰鲭鲨 阅读(38) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe define the density of a non-empty simple undirected graph as $\displaystyle\frac{(\text{number of edges})}{(\text{number of vertic 阅读全文
posted @ 2023-06-02 22:34 灰鲭鲨 阅读(25) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a tuple of $N$ non-negative integers $A=(A_1,A_2,\ldots,A_N)$ such that $A_1=0$ and $A_N>0$. Takahashi has $N$ counters 阅读全文
posted @ 2023-06-02 22:02 灰鲭鲨 阅读(13) 评论(0) 推荐(0) 编辑
摘要:Problem StatementSnuke found a random number generator. It generates an integer between $0$ and $N-1$ (inclusive). An integer sequence $A_0, A_1, \cdo 阅读全文
posted @ 2023-06-02 18:15 灰鲭鲨 阅读(16) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a positive integer $n$, and a prime number $p$ at least $5$. Find a triple of integers $(x,y,z)$ that satisfies all of 阅读全文
posted @ 2023-05-28 22:20 灰鲭鲨 阅读(7) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are an integer $N$ and $M$ pairs of integers: $(a_1, b_1), (a_2, b_2), \dots, (a_M, b_M)$. Each pair $(a_i, b_i)$ satisfies $1 阅读全文
posted @ 2023-05-27 21:50 灰鲭鲨 阅读(42) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given positive integers $N$ and $K$. Find the number, modulo $998244353$, of integer sequences $\bigl(f(0), f(1), \ldots, f(2 阅读全文
posted @ 2023-04-29 12:13 灰鲭鲨 阅读(28) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a string $S$ consisting of lowercase English letters. Print the number of non-empty strings $T$ that satisfy the follow 阅读全文
posted @ 2023-04-29 08:54 灰鲭鲨 阅读(46) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a sequence of $N$ non-negative integers $A=(A_1,A_2,\dots,A_N)$ and a positive integer $K$. Find the bitwise $\mathrm{X 阅读全文
posted @ 2023-03-12 07:37 灰鲭鲨 阅读(38) 评论(0) 推荐(0) 编辑
摘要:h3>Problem StatementJoisino is about to compete in the final round of a certain programming competition. In this contest, there are $N$ problems, numb 阅读全文
posted @ 2023-03-11 22:36 灰鲭鲨 阅读(16) 评论(0) 推荐(0) 编辑
摘要:a 阅读全文
posted @ 2023-02-21 14:05 灰鲭鲨 阅读(11) 评论(0) 推荐(0) 编辑
摘要:Problem StatementWe have a tree $T$ with vertices numbered $1$ to $N$. The $i$-th edge of $T$ connects vertex $u_i$ and vertex $v_i$. Let us use $T$ t 阅读全文
posted @ 2023-02-20 09:57 灰鲭鲨 阅读(36) 评论(0) 推荐(0) 编辑
摘要:Problem StatementA museum exhibits $N$ jewels, Jewel $1, 2, ..., N$. The coordinates of Jewel $i$ are $(x_i, y_i)$ (the museum can be regarded as a tw 阅读全文
posted @ 2023-01-23 15:31 灰鲭鲨 阅读(40) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a directed graph $G$ with $N$ vertices and $M$ edges. The vertices are numbered $1, 2, \ldots, N$. The $i$-th edge is d 阅读全文
posted @ 2023-01-23 10:57 灰鲭鲨 阅读(61) 评论(0) 推荐(0) 编辑
摘要:Problem StatementSnuke is playing with red and blue balls, placing them on a two-dimensional plane. First, he performed $N$ operations to place red ba 阅读全文
posted @ 2023-01-13 13:16 灰鲭鲨 阅读(22) 评论(0) 推荐(0) 编辑
摘要:Problem StatementSnuke is having another barbeque party. This time, he will make one serving of Skewer Meal. He has a stock of $N$ Skewer Meal Packs. 阅读全文
posted @ 2023-01-13 11:45 灰鲭鲨 阅读(18) 评论(0) 推荐(0) 编辑
摘要:Problem StatementYou are given a simple connected undirected graph with $N$ vertices and $M$ edges. (A graph is said to be simple if it has no multi-e 阅读全文
posted @ 2023-01-09 22:50 灰鲭鲨 阅读(45) 评论(0) 推荐(0) 编辑
摘要:Problem StatementThere are $N$ people and $K$ nations, labeled as Person $1$, Person $2$, $\ldots$, Person $N$ and Nation $1$, Nation $2$, $\ldots$, N 阅读全文
posted @ 2023-01-09 22:45 灰鲭鲨 阅读(43) 评论(0) 推荐(0) 编辑
摘要:Problem StatementGiven a sequence $A$ of $N$ numbers, answer the following $Q$ questions. In the $i$-th question, you are given integers $L_i$ and $R_ 阅读全文
posted @ 2023-01-09 21:48 灰鲭鲨 阅读(45) 评论(0) 推荐(0) 编辑