题目链接: G. Hiring time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output The head of human resources department decided to hire a new employee. He created a test exercise for candidates which shoul…
E. George and Cards George is a cat, so he loves playing very much. Vitaly put n cards in a row in front of George. Each card has one integer written on it. All cards had distinct numbers written on them. Let's number the cards from the left to the…