![](https://img-blog.csdnimg.cn/2019091813595558.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
629 (Div. 3)
。
AVICIIl
这个作者很懒,什么都没留下…
展开
-
B. K-th Beautiful String
For the given integer n (n>2) let's write down all the strings of length n which contain n−2 letters 'a' and two letters 'b' in lexicographical (alphabetical) order.Recall that the string s of length n is lexicographically less than string t of length n,原创 2020-04-07 15:43:02 · 392 阅读 · 0 评论 -
C. Ternary XOR
A number is ternary if it contains only digits 0, 1 and 2. For example, the following numbers are ternary: 1022, 11, 21, 2002.You are given a long ternary number x. The first (leftmost) digit of x is guaranteed to be 2, the other digits of x can be 0, 1原创 2020-04-07 15:55:20 · 147 阅读 · 0 评论 -
D. Carousel
The round carousel consists of n figures of animals. Figures are numbered from 1 to n in order of the carousel moving. Thus, after the n-th figure the figure with the number 1 follows. Each figure has its own type — the type of the animal corresponding to原创 2020-04-07 16:08:45 · 132 阅读 · 0 评论