Codeforces Round 682 (Div. 2)


A. Specific Tastes of Andre
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1
2
4
Output
24
19 33
7 37 79 49
----------------------------------------------------------------------------------------------------
B. Valerii Against Everyone
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
6
4 3 0 1 2 0
2
2 5
Output
YES
NO
----------------------------------------------------------------------------------------------------
C. Engineer Artem
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
3 2
1 2
4 5
7 8
2 2
1 1
3 3
2 2
1 3
2 2
Output
1 2
5 6
7 8
2 1
4 3
2 4
3 2
----------------------------------------------------------------------------------------------------
D. Powerful Ksenia
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
4 2 1 7 2
Output
YES
1
1 3 4
Input
4
10 4 49 22
Output
NO
----------------------------------------------------------------------------------------------------
E. Yurii Can Do Everything
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
8
3 1 2 3 1 2 3 15
Output
6
Input
10
997230370 58052053 240970544 715275815 250707702 156801523 44100666 64791577 43523002 480196854
Output
2
----------------------------------------------------------------------------------------------------
F. Olha and Igor
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
2
7
4
Output
? 7 3 5
? 1 6 4
? 1 5 4
! 4
----------------------------------------------------------------------------------------------------
