随笔分类 - Codeforces
摘要:A. Lame King You are given a checkerboard of size , i. e. it has rows and columns. The rows of this checkerboard are numbe
阅读全文
摘要:D. Buying gifts Little Sasha has two friends, whom he wants to please with gifts on the Eighth of March. To do this, he went to the largest shopping c
阅读全文
摘要:F. Dasha and Nightmares Dasha, an excellent student, is studying at the best mathematical lyceum in the country. Recently, a mysterious stranger broug
阅读全文
摘要:D. Remove Two Letters Dmitry has a string , consisting of lowercase Latin letters. Dmitry decided to remove two consecutive characters from the str
阅读全文
摘要:D. Maximum Subarray You are given an array , consisting of integers. You are also given two integers and . You have t
阅读全文
摘要:C. Maximum Set A set of positive integers is called beautiful if, for every two integers and from this set, either divides or
阅读全文
摘要:D. Serval and Shift-Shift-Shift Serval has two -bit binary integer numbers and . He wants to share those numbers with Toxel. Since Toxel lik
阅读全文
摘要:D. Triangle Coloring You are given an undirected graph consisting of vertices and edges, where is divisible by . Each edge has a weight
阅读全文
摘要:D. Moscow Gorillas In winter, the inhabitants of the Moscow Zoo are very bored, in particular, it concerns gorillas. You decided to entertain them and
阅读全文
摘要:B. Fedya and Array For his birthday recently Fedya was given an array of integers arranged in a circle, For each pair of neighboring numbers (
阅读全文
摘要:B. Jumbo Extra Cheese 2 Pak Chanek has two-dimensional slices of cheese. The -th slice of cheese can be represented as a rectangle of dimension
阅读全文
摘要:D. Moving Dots We play a game with dots on a number line. The initial coordinate of the -th dot is . These coordinates are distinct. Every
阅读全文
摘要:B. Sum of Two Numbers The sum of digits of a non-negative integer is the result of summing up its digits together when written in the decimal syst
阅读全文
摘要:E. Sum Over Zero You are given an array of integers. Consider as a set of segments satisfying the following conditions
阅读全文
摘要:D. Lucky Permutation You are given a permutation of length . In one operation, you can choose two indices and swa
阅读全文
摘要:E. Monsters (hard version) This is the hard version of the problem. In this version, you need to find the answer for every prefix of the monster array
阅读全文
摘要:G2. Teleporters (Hard Version) The only difference between the easy and hard versions are the locations you can teleport to. Consider the points $0,1,
阅读全文
摘要:E. Negatives and Positives Given an array consisting of elements, find the maximum possible sum the array can have after performing the follow
阅读全文
摘要:F. Timofey and Black-White Tree Timofey came to a famous summer school and found a tree on vertices. A tree is a connected undirected graph withou
阅读全文