C. Enlarge GCD time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Mr. F has n positive integers, a1,a2,-,an. He thinks the greatest common divisor of these integers is too small. So he wants to en…
C. Mind Control You and your n−1 friends have found an array of integers a1,a2,-,an. You have decided to share it in the following way: All n of you stand in a line in a particular order. Each minute, the person at the front of the line chooses eithe…
B. Vika and Squares time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vika has n jars with paints of distinct colors. All the jars are numbered from 1 to n and the i-th jar contains ai liter…
Little X used to play a card game called "24 Game", but recently he has found it too easy. So he invented a new game. Initially you have a sequence of n integers: 1, 2, ..., n. In a single step, you can pick two of them, let's denote them a and …