Educational Codeforces Round 5


A. Comparing Two Long Integers
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
9
10
Output
<
Input
11
10
Output
>
Input
00012345
12345
Output
=
Input
0123
9
Output
>
Input
0123
111
Output
>
----------------------------------------------------------------------------------------------------
B. Dinner with Emma
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 4
4 1 3 5
2 2 2 2
5 4 5 1
Output
2
Input
3 3
1 2 3
2 3 1
3 1 2
Output
1
----------------------------------------------------------------------------------------------------
C. The Labyrinth
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
*.*
.*.
*.*
Output
3.3
.5.
3.3
Input
4 5
**..*
..***
.*.*.
*.*.*
Output
46..3
..732
.6.4.
5.4.3
----------------------------------------------------------------------------------------------------
D. Longest k-Good Segment
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 5
1 2 3 4 5
Output
1 5
Input
9 3
6 5 1 2 3 2 1 4 5
Output
3 7
Input
3 1
1 2 3
Output
1 1
----------------------------------------------------------------------------------------------------
E. Sum of Remainders
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 4
Output
4
Input
4 4
Output
1
Input
1 1
Output
0
----------------------------------------------------------------------------------------------------
F. Expensive Strings
time limit per test: 6 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
2
aa
bb
2 1
Output
4
Input
2
aa
ab
2 1
Output
5
----------------------------------------------------------------------------------------------------
