MemSQL Start[c]UP 2.0 - Round 1


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

Examples
Input
7
j......
Output
jolteon
Input
7
...feon
Output
leafeon
Input
7
.l.r.o.
Output
flareon
----------------------------------------------------------------------------------------------------
B. 4-point polyline
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1
Output
1 1
0 0
1 0
0 1
Input
0 10
Output
0 1
0 10
0 0
0 9
----------------------------------------------------------------------------------------------------
C. Magic Trick
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2
Output
0.6666666666666666
Input
4 4
Output
0.4000000000000000
Input
1 2
Output
1.0000000000000000
----------------------------------------------------------------------------------------------------
D. Washer, Dryer, Folder
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1 1 1 5 5 5
Output
15
Input
8 4 3 2 10 5 2
Output
32
----------------------------------------------------------------------------------------------------
E. Three strings
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
abc
bc
cbc
Output
3 1 
Input
abacaba
abac
abcd
Output
11 2 0 0 
----------------------------------------------------------------------------------------------------
F. Permutation
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 3 4 2
Output
NO
Input
5
1 5 2 4 3
Output
YES
----------------------------------------------------------------------------------------------------
