随笔分类 - CodeForces
摘要:The Little Elephant loves strings very much. He has an array a from n strings, consisting of lowercase English letters. Let's number the elements of t
阅读全文
摘要:Police headquarter is monitoring signal on different frequency levels. They have got two suspiciously encoded strings s1 and s2 from two different fre
阅读全文
摘要:Devu wants to decorate his garden with flowers. He has purchased n boxes, where the i-th box contains fi flowers. All flowers in a single box are of t
阅读全文
摘要:Genos recently installed the game Zuma on his phone. In Zuma there exists a line of n gemstones, the i-th of which has color ci. The goal of the game
阅读全文
摘要:Ivan has n different boxes. The first of them contains some balls of n different colors. Ivan wants to play a strange game. He wants to distribute the
阅读全文
摘要:To stay woke and attentive during classes, Karen needs some coffee! Karen, a coffee aficionado, wants to know the optimal temperature for brewing the
阅读全文
摘要:Recently in school Alina has learned what are the persistent data structures: they are data structures that always preserves the previous version of i
阅读全文
摘要:Anton likes permutations, especially he likes to permute their elements. Note that a permutation of n elements is a sequence of numbers {a1, a2, ...,
阅读全文
摘要:Bob has a favorite number k and ai of length n. Now he asks you to answer m queries. Each query is given by a pair li and ri and asks you to count the
阅读全文