Codeforces Round 511 (Div. 2)


A. Little C Loves 3 I
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
Output
1 1 1
Input
233
Output
77 77 79
----------------------------------------------------------------------------------------------------
B. Cover Points
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 1
1 2
2 1
Output
3
Input
4
1 1
1 2
2 1
2 2
Output
4
----------------------------------------------------------------------------------------------------
C. Enlarge GCD
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2 4
Output
1
Input
4
6 9 15 30
Output
2
Input
3
1 1 1
Output
-1
----------------------------------------------------------------------------------------------------
D. Little C Loves 3 II
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2
Output
0
Input
3 3
Output
8
----------------------------------------------------------------------------------------------------
E. Region Separation
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 1 1 1
1 2 3
Output
4
Input
4
1 1 1 1
1 2 2
Output
2
Input
4
1 2 1 2
1 1 3
Output
3
----------------------------------------------------------------------------------------------------
