随笔分类 - Codeforces
摘要:D. The Omnipotent Monster Killer You, the monster killer, want to kill a group of monsters. The monsters are on a tree with vertices. On vertex wi
阅读全文
摘要:G2. Permutation Problem (Hard Version) This is the hard version of the problem. The only difference is that in this version and
阅读全文
摘要:C2. Magnitude (Hard Version) The two versions of the problem are different. You may want to read both versions. You can make hacks only if both versio
阅读全文
摘要:G. Yasya and the Mysterious Tree Yasya was walking in the forest and accidentally found a tree with vertices. A tree is a connected undirected gra
阅读全文
摘要:D. Invertible Bracket Sequences A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inser
阅读全文
摘要:D. XORificator You are given a binary (consisting only of 0s and 1s) matrix. You are also given a XORificator, using which you can invert
阅读全文
摘要:E. Chain Queries You are given a tree of vertices numbered from to . Initially, all vertices are colored white or black. You are asked to p
阅读全文
摘要:F. Cutting Game Alice and Bob were playing a game again. They have a grid of size (), on which there are chips,
阅读全文
摘要:E. Unique Array You are given an integer array of length . A subarray of is one of its contiguous subsequences (i. e. an array $[a_l, a_{l+
阅读全文
摘要:G2. Division + LCP (hard version) This is the hard version of the problem. In this version . You are given a string . For a fixed , cons
阅读全文
摘要:D2. Reverse Card (Hard Version) The two versions are different problems. You may want to read both versions. You can make hacks only if both versions
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:D. Colored Balls There are balls of different colors; the number of balls of the -th color is . The balls can be combined into groups. Eac
阅读全文
摘要:D. Buying Jewels Alice has 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
阅读全文
摘要:C. Ticket Hoarding As the CEO of a startup company, you want to reward each of your employees with a ticket to the upcoming concert. The tickets w
阅读全文
摘要: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
阅读全文
摘要:D. Non-Palindromic Substring A string is said to be -good if there exists at least one substring of length which is not a palindr
阅读全文
摘要:G. Shuffling Songs Vladislav has a playlist consisting of songs, numbered from to . Song has genre and writer . He wants to
阅读全文
摘要:D. Exam in MAC The Master's Assistance Center has announced an entrance exam, which consists of the following. The candidate is given a set of siz
阅读全文