01 2023 档案
摘要:# [ZJOI2016]小星星 ## 题目描述 小 Y 是一个心灵手巧的女孩子,她喜欢手工制作一些小饰品。她有 $n$ 颗小星星,用 $m$ 条彩色的细线串了起来,每条细线连着两颗小星星。 有一天她发现,她的饰品被破坏了,很多细线都被拆掉了。这个饰品只剩下了 $n-1$ 条细线,但通过这些细线,这颗
阅读全文
摘要:# [IOI2022] 最罕见的昆虫 ## 题目描述 Pak Blangkon 的房子四周有 $N$ 只昆虫,编号为 $0$ 至 $N-1$。每只昆虫有一个**类型**,以从 $0$ 至 $10^9$(包含 $0$ 和 $10^9$)的整数编号。可能有多只昆虫类型相同。 假设将昆虫按照类型分组。我们
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:题目描述 You have an array $ a_0, a_1, \ldots, a_{n-1} $ of length $ n $ . Initially, $ a_i = 2^i $ for all $ 0 \le i \lt n $ . Note that array $ a $ is z
阅读全文
摘要: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
阅读全文
摘要: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.
阅读全文
摘要:[SDOI2016]储能表 题目描述 有一个 n 行 m 列的表格,行从 0 到 n−1 编号,列从 0 到 m−1 编号。每个格子都储存着能量。最初,第 i 行第 j 列的格子储存着 (i xor j) 点能量。所以,整个表格储存的总能量是, $$\sum_{i=0}^{n-1} \sum_{j=
阅读全文
摘要: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
阅读全文
摘要:Problem StatementThere are $N$ people and $K$ nations, labeled as Person $1$, Person $2$, $\ldots$, Person $N$ and Nation $1$, Nation $2$, $\ldots$, N
阅读全文
摘要: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_
阅读全文
摘要: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
阅读全文
摘要:Problem StatementThis is an interactive task (where your program interacts with the judge's program via Standard Input and Output). You are given inte
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Problem StatementWe have a directed graph with $N$ vertices, called Vertex $1$, Vertex $2$, $\ldots$, Vertex $N$. For each pair of integers such that
阅读全文
摘要:Problem StatementYou are given an undirected tree with $N$ vertices. Let us call the vertices Vertex $1$, Vertex $2$, $\ldots$, Vertex $N$. For each $
阅读全文
摘要:杜教筛是拿来求积性函数前缀和的东西 $h=fg$ $s(n)=\sum\limits_{i=1}^ng(i)$ 而杜教筛可以在 $O(n^{\frac 23})$ 的复杂度内求出 $s(n)$,前提是存在两个很好求前缀和的函数 $f$ 和 $h$ 满足 $h=fg$ $\sum\limits_{i=
阅读全文
摘要:Problem StatementTakahashi has $A$ apple seedlings, $B$ banana seedlings, and $C$ cherry seedlings. Seedlings of the same kind cannot be distinguished
阅读全文