摘要:
E. Cactus Wall Monocarp is playing Minecraft and wants to build a wall of cacti. He wants to build it on a field of sand of the size of $n \times m$ c 阅读全文
摘要:
D. ConstructOR You are given three integers $a$, $b$, and $d$. Your task is to find any integer $x$ which satisfies all of the following conditions, o 阅读全文
摘要:
区间最大公约数 给定一个长度为 $N$ 的数列 $A$,以及 $M$ 条指令,每条指令可能是以下两种之一: C l r d ,表示把 $A[l],A[l+1], \ldots ,A[r]$ 都加上 $d$。 Q l r ,表示询问 $A[l],A[l+1], \ldots ,A[r]$ 的最大公约数 阅读全文
摘要:
B. Diverse Substrings A non-empty digit string is diverse if the number of occurrences of each character in it doesn't exceed the number of distinct c 阅读全文
摘要:
Maximum Number of Non-overlapping Palindrome Substrings You are given a string s and a positive integer k . Select a set of non-overlapping substrings 阅读全文
摘要:
Minimum Number of Operations to Sort a Binary Tree by Level You are given the root of a binary tree with unique values. In one operation, you can choo 阅读全文
摘要:
D. Yet Another Problem You are given an array $a$ of $n$ integers $a_1,a_2,a_3, \ldots, a_n$. You have to answer $q$ independent queries, each consist 阅读全文
摘要:
C. Swap Game Alice and Bob are playing a game on an array $a$ of $n$ positive integers. Alice and Bob make alternating moves with Alice going first. I 阅读全文