摘要:
Advanced CPU Manufacturer (ACM) is one of the best CPU manufacturer in the world. Every day, they manufacture n CPU chips and sell them all over the w 阅读全文
摘要:
有时候快排/归并之类并不简简单单只是排序,比如快排可以求第k大,归并在部分已排序的情况下效率较高不容易被卡~ #include <bits/stdc++.h> using namespace std; void merge(int a[], int l, int r, int mid) { int 阅读全文
摘要:
Vova had a pretty weird sleeping schedule. There are hh hours in a day. Vova will sleep exactly nn times. The ii -th time he will sleep exactly after 阅读全文
摘要:
The next lecture in a high school requires two topics to be discussed. The ii -th topic is interesting by aiai units for the teacher and by bibi units 阅读全文
摘要:
There is a frog staying to the left of the string s=s1s2…sns=s1s2…sn consisting of nn characters (to be more precise, the frog initially stays at the 阅读全文
摘要:
Problem Statement Snuke has decided to play a game using cards. He has a deck consisting of NN cards. On the ii -th card from the top, an integer AiAi 阅读全文
摘要:
The round carousel consists of nn figures of animals. Figures are numbered from 11 to nn in order of the carousel moving. Thus, after the nn -th figur 阅读全文
摘要:
A number is ternary if it contains only digits 00 , 11 and 22 . For example, the following numbers are ternary: 10221022 , 1111 , 2121 , 20022002 . Yo 阅读全文
摘要:
For the given integer nn (n>2n>2 ) let's write down all the strings of length nn which contain n−2n−2 letters 'a' and two letters 'b' in lexicographic 阅读全文