Codeforces Round 726 (Div. 2)


A. Arithmetic Array
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3
1 1 1
2
1 2
4
8 4 6 2
1
-2
Output
0
1
16
1
----------------------------------------------------------------------------------------------------
B. Bad Boy
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7
2 3 1 1
4 4 1 2
3 5 2 2
5 1 2 1
3 1 3 1
1 1 1 1
1000000000 1000000000 1000000000 50
Output
1 2 2 3
4 1 4 4
3 1 1 5
5 1 1 1
1 1 2 1
1 1 1 1
50 1 1 1000000000
----------------------------------------------------------------------------------------------------
C. Challenging Cliffs
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
4
4 2 1 2
2
3 1
Output
2 4 1 2 
1 3
----------------------------------------------------------------------------------------------------
D. Deleting Divisors
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1
4
12
69
Output
Bob
Alice
Alice
Bob
----------------------------------------------------------------------------------------------------
E1. Erase and Extend (Easy Version)
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
8 16
dbcadabc
Output
dbcadabcdbcadabc
Input
4 5
abcd
Output
aaaaa
----------------------------------------------------------------------------------------------------
E2. Erase and Extend (Hard Version)
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
8 16
dbcadabc
Output
dbcadabcdbcadabc
Input
4 5
abcd
Output
aaaaa
----------------------------------------------------------------------------------------------------
F. Figure Fixing
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
4 4
5 1 2 -3
3 3 10 1
1 2
1 4
3 2
3 4
4 4
5 8 6 6
-3 1 15 4
1 2
1 4
3 2
3 4
Output
YES
NO
----------------------------------------------------------------------------------------------------
