随笔分类 - Codeforces
摘要:E1. Prime Gaming (Easy Version) This is the easy version of the problem. The difference between the versions is that in this version, $m \le 2$. You c
阅读全文
摘要:D. A Cruel Segment's Thesis You are given $n$ segments on a number line. The $i$-th segment is represented as $[l_i, r_i]$. Initially, all the segment
阅读全文
摘要:F. Rada and the Chamomile Valley Yesterday, Rada found a portal that can transport her to the Chamomile Valley and back. Rada's happiness knew no boun
阅读全文
摘要:F. Unjust Binary Life Yuri is given two binary strings $a$ and $b$, both of which are of length $n$. The two strings dynamically define an $n \times n
阅读全文
摘要:E. Ancient Tree Bahamin came from the past to visit Ali — who came from the future. He also brought an ancient tree as a gift for Ali. He noticed some
阅读全文
摘要:D. Token Removing Define a sequence of integers $a$ valid if and only if $\forall 1 \le i \le n, 0 \le a_i \le i$. Define the weight $f(a)$ of a valid
阅读全文
摘要:F. Small Operations Given an integer $x$ and an integer $k$. In one operation, you can perform one of two actions: choose an integer $1 \le a \le k$ a
阅读全文
摘要:G. Build an Array Yesterday, Dima found an empty array and decided to add some integers to it. He can perform the following operation an unlimited num
阅读全文
摘要:C. Envy For a connected undirected weighted graph $G$, MST (minimum spanning tree) is a subgraph of $G$ that contains all of $G$'s vertices, is a tree
阅读全文
摘要:D. Apple Tree Traversing There is an apple tree with $n$ nodes, initially with one apple at each node. You have a paper with you, initially with nothi
阅读全文
摘要:G. Game With Triangles: Season 2 There is a regular polygon with $n$ sides ($n \ge 3$). The vertices are indexed as $1,2,\ldots,n$ in clockwise order.
阅读全文
摘要:G. I've Been Flipping Numbers for 300 Years and Calculated the Sum After three hundred years of slime farming, Akito finally obtained the magical numb
阅读全文
摘要:D. Eating There are $n$ slimes on a line, the $i$-th of which has weight $w_i$. Slime $i$ is able to eat another slime $j$ if $w_i \geq w_j$; afterwar
阅读全文
摘要:H. Bro Thinks He's Him Skibidus thinks he's Him! He proved it by solving this difficult task. Can you also prove yourself? Given a binary string$^{\te
阅读全文
摘要:E. Triangle Tree You are given a rooted tree$^{\text{∗}}$ containing $n$ vertices rooted at vertex $1$. A pair of vertices $(u,v)$ is called a good pa
阅读全文
摘要:D. Game With Triangles There are $n+m$ distinct points $(a_1,0), (a_2,0), \ldots, (a_{n},0), (b_1,2), (b_2,2), \ldots, (b_{m},2)$ on the plane. Initia
阅读全文
摘要:H. Hard Demon Problem Swing is opening a pancake factory! A good pancake factory must be good at flattening things, so Swing is going to test his new
阅读全文
摘要:G. Natlan Exploring You are exploring the stunning region of Natlan! This region consists of $n$ cities, and each city is rated with an attractiveness
阅读全文
摘要:G. Sakurako and Chefir Given a tree with $n$ vertices rooted at vertex $1$. While walking through it with her cat Chefir, Sakurako got distracted, and
阅读全文
摘要:E. Card Game In the most popular card game in Berland, a deck of $n \times m$ cards is used. Each card has two parameters: suit and rank. Suits in the
阅读全文