标签 - Codeforces

Bomboslav set up a branding agency and now helps companies to create new logos and advertising slogans. In term of this problems, slogan of the company should be a non-empty substring of its name. For example, if the company name is "hornsandhoofs", then substrings "sand" and "hor" could b
? 解题记录 ? ? Codeforces ? ? 并查集 ?    2018-07-10 17:52:07    417    0    0
For long time scientists study the behavior of sharks. Sharks, as many other species, alternate short movements in a certain location and long movements between locations. Max is a young biologist. For n" data-mce-tabindex="0">nn days he watched a specific shark, and now he knows the di
? 解题记录 ? ? Codeforces ? ? 状态压缩 ?    2018-07-10 17:29:06    623    0    0
There are two small spaceship, surrounded by two groups of enemy larger spaceships. The space is a two-dimensional plane, and one group of the enemy spaceships is positioned in such a way that they all have integer y" data-mce-tabindex="0">yy-coordinates, and their x" data-mce-tabindex=
? 解题记录 ? ? Codeforces ? ? 扩展欧几里得 ?    2018-07-05 23:00:10    655    0    0
time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Consider a billiard table of rectangular size n×m" data-mce-tabindex="0">n×mn×m with four pockets. Let's introduce a coordinate system with the origin at th
? 解题记录 ? ? Codeforces ?    2018-06-09 09:33:50    372    0    0
题目描述You are given an integer n from 11 to 10^{18} without leading zeroes. In one move you can swap any two adjacent digits in the given number in such a way that the resulting number will not contain leading zeroes. In other words, after each move the number you have ca
? 解题记录 ? ? 数学 ? ? Codeforces ?    2018-03-12 16:05:27    420    0    0
Alice and Bob begin their day with a quick game. They first choose a starting number X0 ≥ 3 and try to reach one million by the process described below. Alice goes first and then they take alternating turns. In the i-th turn, the player whose turn it is selects a prime number smaller than the curr
? 解题记录 ? ? 字典树 ? ? Codeforces ?    2018-03-12 15:47:10    729    0    0
  Alice has a very important message M consisting of some non-negative integers that she wants to keep secret from Eve. Alice knows that the only theoretically secure cipher is one-time pad. Alice generates a random key K of the length equal to the message's length. Alice co
? 解题记录 ? ? Codeforces ? ? 期望概率 ?    2017-11-25 14:16:41    559    0    0
Twilight Sparkle was playing Ludo with her friends Rainbow Dash, Apple Jack and Flutter Shy. But she kept losing. Having returned to the castle, Twilight Sparkle became interested in the dice that were used in the game. The dice has m faces: the first face of the dice contains a dot, the s
? 解题记录 ? ? Codeforces ? ? 回文自动机 ?    2017-11-25 12:00:35    439    0    0
DescriptionAfter finishing his homework, our problem setter Federmann decided to kill time by hangingaround online. He found a cool chat room that discusses competitive programming. Federmannhas already joined lot of such chat rooms, but this one is special. Once he entered thechat room, he noticed