Codeforces Round 295 (Div. 2)


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

Examples
Input
12
toosmallword
Output
NO
Input
35
TheQuickBrownFoxJumpsOverTheLazyDog
Output
YES
----------------------------------------------------------------------------------------------------
B. Two Buttons
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 6
Output
2
Input
10 1
Output
9
----------------------------------------------------------------------------------------------------
C. DNA Alignment
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
C
Output
1
Input
2
AG
Output
4
Input
3
TTT
Output
1
----------------------------------------------------------------------------------------------------
D. Cubes
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
2 1
1 0
0 1
Output
19
Input
5
0 0
0 1
0 2
0 3
0 4
Output
2930
----------------------------------------------------------------------------------------------------
E. Pluses everywhere
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 1
108
Output
27
Input
3 2
108
Output
9
----------------------------------------------------------------------------------------------------
