April Fools Day Contest 2016


A. Da Vinci Powers
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
3
Output
8
Input
10
Output
1024
----------------------------------------------------------------------------------------------------
B. Scrambled
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
1
2
0
Output
0.500000
Input
2
2 3
1 0
Output
0.666667
----------------------------------------------------------------------------------------------------
C. Without Text
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
Codeforces
Output
-87
Input
APRIL.1st
Output
17
----------------------------------------------------------------------------------------------------
D. Rosetta Problem
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
129
Output
1
----------------------------------------------------------------------------------------------------
E. Out of Controls
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
3
0 1 1
1 0 4
1 4 0
Output
2
Input
4
0 1 2 3
1 0 4 5
2 4 0 6
3 5 6 0
Output
5
----------------------------------------------------------------------------------------------------
F. Ace It!
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
A221033
Output
21
Input
A223635
Output
22
Input
A232726
Output
23
----------------------------------------------------------------------------------------------------
G. You're a Professional
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
3 3 2
YYY
NNN
YNY
Output
2
Input
4 4 1
NNNY
NNYN
NYNN
YNNN
Output
4
----------------------------------------------------------------------------------------------------
