Codeforces Round 464 (Div. 2)


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

Examples
Input
5
2 4 5 1 3
Output
YES
Input
5
5 5 5 5 1
Output
NO
----------------------------------------------------------------------------------------------------
B. Hamster Farm
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
19 3
5 4 10
Output
2 4
Input
28 3
5 6 30
Output
1 5
----------------------------------------------------------------------------------------------------
C. Convenient For Everybody
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2 3
1 3
Output
3
Input
5
1 2 3 4 1
1 3
Output
4
----------------------------------------------------------------------------------------------------
D. Love Rescue
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
abb
dad
Output
2
a d
b a
Input
8
drpepper
cocacola
Output
7
l e
e d
d c
c p
p o
o r
r a
----------------------------------------------------------------------------------------------------
E. Maximize!
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
1 3
2
1 4
2
1 8
2
Output
0.0000000000
0.5000000000
3.0000000000
Input
4
1 1
1 4
1 5
2
Output
2.0000000000
----------------------------------------------------------------------------------------------------
F. Cutlet
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 2
3 5
11 13
Output
Full
2
Input
10 3
3 5
9 10
11 13
Output
Full
1
Input
20 1
3 19
Output
Hungry
----------------------------------------------------------------------------------------------------
