Codeforces Round 110 (Div. 2)


A. Game Outcome
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
1
Output
0
Input
2
1 2
3 4
Output
2
Input
4
5 7 8 4
9 5 3 2
1 6 6 4
9 5 7 3
Output
6
----------------------------------------------------------------------------------------------------
B. Trace
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
1
Output
3.1415926536
Input
3
1 4 2
Output
40.8407044967
----------------------------------------------------------------------------------------------------
C. Message
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
aaaaa
aaa
Output
0
Input
abcabc
bcd
Output
1
Input
abcdef
klmnopq
Output
7
----------------------------------------------------------------------------------------------------
D. Suspects
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 1
+1
Output
Truth
Input
3 2
-1
-2
-3
Output
Not defined
Not defined
Not defined
Input
4 1
+2
-3
+4
-1
Output
Lie
Not defined
Lie
Not defined
----------------------------------------------------------------------------------------------------
E. Cipher
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
ab
Output
1
Input
1
aaaaaaaaaaa
Output
0
Input
2
ya
klmbfxzb
Output
24
320092793
----------------------------------------------------------------------------------------------------
