Codeforces Round 832 (Div. 2)


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

Examples
Input
4
2
10 -10
4
-2 -1 11 0
3
2 3 2
5
-9 2 0 0 -4
Output
0
8
7
11
----------------------------------------------------------------------------------------------------
B. BAN BAN
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
1
2
Output
1
1 2
1
2 6
----------------------------------------------------------------------------------------------------
C. Swap Game
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
2
1 1
2
2 1
3
5 4 4
Output
Bob
Alice
Alice
----------------------------------------------------------------------------------------------------
D. Yet Another Problem
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7 6
3 0 3 3 1 2 3
3 4
4 6
3 7
5 6
1 6
2 2
Output
-1
1
1
-1
2
0
----------------------------------------------------------------------------------------------------
E. List Generation
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 1
1 2
2 2
100 100
Output
8
26
101
886336572
----------------------------------------------------------------------------------------------------
