Codeforces Round 613 (Div. 2)


A. Mezo Playing Zoma
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
LRLR
Output
5
----------------------------------------------------------------------------------------------------
B. Just Eat It!
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
4
1 2 3 4
3
7 4 -1
3
5 -5 5
Output
YES
NO
NO
----------------------------------------------------------------------------------------------------
C. Fadi and LCM
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
Output
1 2
Input
6
Output
2 3
Input
4
Output
1 4
Input
1
Output
1 1
----------------------------------------------------------------------------------------------------
D. Dr. Evil Underscores
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2 3
Output
2
Input
2
1 5
Output
4
----------------------------------------------------------------------------------------------------
E. Delete a Segment
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
4
1 4
2 3
3 6
5 7
3
5 5
5 5
5 5
6
3 3
1 1
5 5
1 5
2 2
4 4
Output
2
1
5
----------------------------------------------------------------------------------------------------
F. Classical?
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
13 35 77
Output
1001
Input
6
1 2 4 8 16 32
Output
32
----------------------------------------------------------------------------------------------------
