Codeforces Beta Round 11


A. Increasing Sequence
time limit per test: 1 second
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
4 2
1 3 3 2
Output
3
----------------------------------------------------------------------------------------------------
B. Jumping Jack
time limit per test: 1 second
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
2
Output
3
Input
6
Output
3
Input
0
Output
0
----------------------------------------------------------------------------------------------------
C. How Many Squares?
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
2
8 8
00010001
00101000
01000100
10000010
01000100
00101000
11010011
11000011
10 10
1111111000
1000001000
1011001000
1011001010
1000001101
1001001010
1010101000
1001001000
1000001000
1111111000
Output
1
2
Input
1
12 11
11111111111
10000000001
10111111101
10100000101
10101100101
10101100101
10100000101
10100000101
10111111101
10000000001
11111111111
00000000000
Output
3
----------------------------------------------------------------------------------------------------
D. A Simple Task
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 6
1 2
1 3
1 4
2 3
2 4
3 4
Output
7
----------------------------------------------------------------------------------------------------
E. Forward, march!
time limit per test: 1 second
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
X
Output
0.000000
Input
LXRR
Output
50.000000
----------------------------------------------------------------------------------------------------
