Codeforces Round 735 (Div. 2)


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

Examples
Input
4
3
2 4 3
4
3 2 3 1
2
69 69
6
719313 273225 402638 473783 804745 323328
Output
12
6
4761
381274500335
----------------------------------------------------------------------------------------------------
B. Cobb
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

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

Examples
Input
5
3 5
4 6
3 2
69 696
123456 654321
Output
4
3
0
640
530866
----------------------------------------------------------------------------------------------------
D. Diane
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3
5
9
19
Output
abc
diane
bbcaabbba
youarethecutestuwuu
----------------------------------------------------------------------------------------------------
E. You
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
3
2 1
1 3
2
1 2
Output
3 1 0
2 0
----------------------------------------------------------------------------------------------------
