Codeforces Round 716 (Div. 2)


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

Examples
Input
2
3
1 5 4
2
100 10000
Output
YES
NO
----------------------------------------------------------------------------------------------------
B. AND 0, Sum Big
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
2 2
100000 20
Output
4
226732710
----------------------------------------------------------------------------------------------------
C. Product 1 Modulo N
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
Output
3
1 2 3 
Input
8
Output
4
1 3 5 7 
----------------------------------------------------------------------------------------------------
D. Cut and Stick
time limit per test: 3 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
6 2
1 3 2 3 3 2
1 6
2 5
Output
1
2
----------------------------------------------------------------------------------------------------
E. Baby Ehab's Hyper Apartment
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
4
0
0
1
1
1
Output
2 3 3 0 1 2
1 0 1
1 0 2
2 2 1 1
3
1111
1111
1111
0001
----------------------------------------------------------------------------------------------------
