Croc Champ 2012 - Round 2


A. Trading Business
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3 10
Venus
6 5 3
7 6 5
8 6 10
Earth
10 9 0
8 6 4
10 9 3
Mars
4 3 0
8 4 12
7 2 5
Output
16
----------------------------------------------------------------------------------------------------
B. Word Cut
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
ab
ab
2
Output
1
Input
ababab
ababab
1
Output
2
Input
ab
ba
2
Output
0
----------------------------------------------------------------------------------------------------
C. Playing with Superglue
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1 6 1 2 1 6
Output
First
Input
6 5 4 3 2 1
Output
First
Input
10 10 1 1 10 10
Output
Second
----------------------------------------------------------------------------------------------------
D. Hyper String
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
cba
dgh
2
1 2
aedfhr
Output
3
Input
2
b
a
5
1 2 1 2 1
aaa
Output
2
----------------------------------------------------------------------------------------------------
E. Archaeology
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
1 2 1
1 3 5
4 1 7
4 5 3
6 4 2
10
+ 3
+ 1
?
+ 6
?
+ 5
?
- 6
- 3
?
Output
5
14
17
10
----------------------------------------------------------------------------------------------------
