Codeforces Beta Round 85 (Div. 2 Only)


A. Petya and Strings
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
aaaa
aaaA
Output
0
Input
abs
Abz
Output
-1
Input
abcdefg
AbCdEfF
Output
1
----------------------------------------------------------------------------------------------------
B. Petya and Square
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 1 1
Output
YES
Input
2 2 2
Output
NO
----------------------------------------------------------------------------------------------------
C. Petya and Inequiations
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 15 15
Output
4
4
1
1
2
Input
2 3 2
Output
-1
Input
1 99 11
Output
11
----------------------------------------------------------------------------------------------------
D. Petya and Divisors
time limit per test: 5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
4 0
3 1
5 2
6 2
18 4
10000 3
Output
3
1
1
2
2
22
----------------------------------------------------------------------------------------------------
E. Petya and Spiders
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 3
Output
4
----------------------------------------------------------------------------------------------------
