上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 65 下一页
摘要: 叶子的颜色 给一棵有 $m$ 个节点的无根树,你可以选择一个度数大于 $1$ 的节点作为根,然后给一些节点(根、内部节点、叶子均可)着以黑色或白色。 你的着色方案应保证根节点到各叶子节点的简单路径上都至少包含一个有色节点,哪怕是这个叶子本身。 对于每个叶子节点 $u$,定义 $c_u$ 为从根节点到 阅读全文
posted @ 2023-08-19 11:34 onlyblues 阅读(47) 评论(0) 推荐(0)
摘要: D. Trees and Segments The teachers of the Summer Informatics School decided to plant $n$ trees in a row, and it was decided to plant only oaks and fir 阅读全文
posted @ 2023-08-16 20:51 onlyblues 阅读(95) 评论(0) 推荐(0)
摘要: E. Maximum Monogonosity You are given an array $a$ of length $n$ and an array $b$ of length $n$. The cost of a segment $[l, r]$, $1 \le l \le r \le n$ 阅读全文
posted @ 2023-08-14 20:15 onlyblues 阅读(83) 评论(0) 推荐(0)
摘要: D. Andrey and Escape from Capygrad An incident occurred in Capygrad, the capital of Tyagoland, where all the capybaras in the city went crazy and star 阅读全文
posted @ 2023-08-13 19:40 onlyblues 阅读(108) 评论(0) 推荐(0)
摘要: G. Vlad and the Mountains Vlad decided to go on a trip to the mountains. He plans to move between $n$ mountains, some of which are connected by roads. 阅读全文
posted @ 2023-08-11 15:57 onlyblues 阅读(123) 评论(0) 推荐(0)
摘要: G. Counting Graphs Given a tree consisting of $n$ vertices. A tree is a connected undirected graph without cycles. Each edge of the tree has its weigh 阅读全文
posted @ 2023-08-08 23:17 onlyblues 阅读(214) 评论(0) 推荐(1)
摘要: E1. PermuTree (easy version) This is the easy version of the problem. The differences between the two versions are the constraint on $n$ and the time 阅读全文
posted @ 2023-08-07 19:59 onlyblues 阅读(117) 评论(0) 推荐(0)
摘要: A. Vika and Her Friends Vika and her friends went shopping in a mall, which can be represented as a rectangular grid of rooms with sides of length $n$ 阅读全文
posted @ 2023-07-17 16:08 onlyblues 阅读(108) 评论(0) 推荐(0)
摘要: C. Particles You have discovered $n$ mysterious particles on a line with integer charges of $c_1,\dots,c_n$. You have a device that allows you to perf 阅读全文
posted @ 2023-07-12 20:07 onlyblues 阅读(107) 评论(0) 推荐(0)
摘要: C. No Prime Differences You are given integers $n$ and $m$. Fill an $n$ by $m$ grid with the integers $1$ through $n\cdot m$, in such a way that for a 阅读全文
posted @ 2023-06-05 15:23 onlyblues 阅读(283) 评论(0) 推荐(1)
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 65 下一页
Web Analytics