摘要: F - Subsequence LCM Problem Statement You are given a sequence of positive integers $A=(A_1,A_2,\dots,A_N)$ of length $N$ and a positive integer $M$. 阅读全文
posted @ 2024-04-19 15:00 onlyblues 阅读(4) 评论(0) 推荐(0) 编辑
摘要: H. The Most Reckless Defense You are playing a very popular Tower Defense game called "Runnerfield 2". In this game, the player sets up defensive towe 阅读全文
posted @ 2024-04-16 21:46 onlyblues 阅读(5) 评论(0) 推荐(0) 编辑
摘要: G. GCD on a grid Not long ago, Egor learned about the Euclidean algorithm for finding the greatest common divisor of two numbers. The greatest common 阅读全文
posted @ 2024-04-13 17:41 onlyblues 阅读(7) 评论(0) 推荐(0) 编辑
摘要: D. Colored Balls There are balls of $n$ different colors; the number of balls of the $i$-th color is $a_i$. The balls can be combined into groups. Eac 阅读全文
posted @ 2024-04-13 16:00 onlyblues 阅读(97) 评论(2) 推荐(0) 编辑
摘要: D. Buying Jewels Alice has $n$ coins and wants to shop at Bob's jewelry store. Today, although Bob has not set up the store yet, Bob wants to make sur 阅读全文
posted @ 2024-04-12 20:37 onlyblues 阅读(13) 评论(0) 推荐(0) 编辑
摘要: C. Ticket Hoarding As the CEO of a startup company, you want to reward each of your $k$ employees with a ticket to the upcoming concert. The tickets w 阅读全文
posted @ 2024-04-09 16:42 onlyblues 阅读(9) 评论(0) 推荐(0) 编辑
摘要: F. New Year Tree You are a programmer and you have a New Year Tree (not the traditional fur tree, though) — a tree of four vertices: one vertex of deg 阅读全文
posted @ 2024-04-08 16:32 onlyblues 阅读(2) 评论(0) 推荐(0) 编辑
摘要: F - Oddly Similar Problem Statement There are $N$ sequences of length $M$, denoted as $A_1, A_2, \ldots, A_N$. The $i$-th sequence is represented by $ 阅读全文
posted @ 2024-04-08 15:31 onlyblues 阅读(27) 评论(0) 推荐(0) 编辑
摘要: D. Non-Palindromic Substring A string $t$ is said to be $k$-good if there exists at least one substring$^\dagger$ of length $k$ which is not a palindr 阅读全文
posted @ 2024-04-04 19:50 onlyblues 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 树上数颜色 题目描述 给一棵根为 $1$ 的树,每次询问子树颜色种类数。 输入格式 第一行一个整数 $n$,表示树的结点数。 接下来 $n-1$ 行,每行一条边。 接下来一行 $n$ 个数,表示每个结点的颜色 $c[i]$。 接下来一个数 $m$,表示询问数。 接下来 $m$ 行表示询问的子树。 输 阅读全文
posted @ 2024-04-03 22:47 onlyblues 阅读(8) 评论(0) 推荐(0) 编辑
Web Analytics