随笔分类 - Codeforces
摘要:G2. Division + LCP (hard version) This is the hard version of the problem. In this version $l\le r$. You are given a string $s$. For a fixed $k$, 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 $n$ different colors; the number of balls of the $i$-th color is $a_i$. The balls can be combined into groups. Eac
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 $t$ is said to be $k$-good if there exists at least one substring$^\dagger$ of length $k$ which is not a palindr
阅读全文
摘要:G. Shuffling Songs Vladislav has a playlist consisting of $n$ songs, numbered from $1$ to $n$. Song $i$ has genre $g_i$ and writer $w_i$. 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 $s$ of siz
阅读全文
摘要:C. Messenger in MAC In the new messenger for the students of the Master's Assistance Center, Keftemerum, an update is planned, in which developers wan
阅读全文
摘要:D. Pinball There is a one-dimensional grid of length $n$. The $i$-th cell of the grid contains a character $s_i$, which is either '<' or '>'. When a p
阅读全文
摘要:C. Sasha and Array Sasha has an array of integers $a_1, a_2, \ldots, a_n$. You have to perform m queries. There might be queries of two types: $1$ $l$
阅读全文
摘要:G. Moving Platforms There is a game where you need to move through a labyrinth. The labyrinth consists of $n$ platforms, connected by $m$ passages. Ea
阅读全文
摘要:D. Sasha and a Walk in the City Sasha wants to take a walk with his girlfriend in the city. The city consists of $n$ intersections, numbered from $1$
阅读全文
摘要:G. One-Dimensional Puzzle You have a one-dimensional puzzle, all the elements of which need to be put in one row, connecting with each other. All the
阅读全文
摘要:D. Lonely Mountain Dungeons Once, the people, elves, dwarves, and other inhabitants of Middle-earth gathered to reclaim the treasures stolen from them
阅读全文
摘要:E. Space Harbour There are $n$ points numbered $1$ to $n$ on a straight line. Initially, there are $m$ harbours. The $i$-th harbour is at point $X_i$
阅读全文
摘要:E. Klever Permutation You are given two integers $n$ and $k$ ($k \le n$), where $k$ is even. A permutation of length $n$ is an array consisting of $n$
阅读全文

浙公网安备 33010602011771号