Codeforces Round 724 (Div. 2)


A. Omkar and Bad Story
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3
3 0 9
2
3 4
5
-7 3 13 -2 8
4
4 8 12 6
Output
yes
4
6 0 3 9
yEs
5
5 3 1 2 4
NO
Yes
6
8 12 6 2 4 10
----------------------------------------------------------------------------------------------------
B. Prinzessin der Verurteilung
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
28
qaabzwsxedcrfvtgbyhnujmiklop
13
cleanairactbd
10
aannttoonn
Output
ac
f
b
----------------------------------------------------------------------------------------------------
C. Diluc and Kaeya
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
3
DDK
6
DDDDDD
4
DKDK
1
D
9
DKDKDDDDK
Output
1 2 1 
1 2 3 4 5 6 
1 1 1 2 
1 
1 1 1 2 1 2 1 1 3 
----------------------------------------------------------------------------------------------------
D. Omkar and Medians
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
4
6 2 1 3
1
4
5
4 -8 5 6 -7
2
3 3
4
2 1 2 3
Output
NO
YES
NO
YES
YES
Input
5
8
-8 2 -6 -5 -4 3 3 2
7
1 1 3 1 0 -2 -1
7
6 12 8 6 2 6 10
6
5 1 2 3 6 7
5
1 3 4 3 0
Output
NO
YES
NO
NO
NO
----------------------------------------------------------------------------------------------------
E. Omkar and Forest
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3 4
0000
00#0
0000
2 1
#
#
1 2
##
6 29
#############################
#000##0###0##0#0####0####000#
#0#0##00#00##00####0#0###0#0#
#0#0##0#0#0##00###00000##00##
#000##0###0##0#0##0###0##0#0#
#############################
Output
2
3
3
319908071
----------------------------------------------------------------------------------------------------
F. Omkar and Akmar
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
Output
4
Input
69420
Output
629909355
Input
42069
Output
675837193
----------------------------------------------------------------------------------------------------
