Educational Codeforces Round 70 (Rated for Div. 2)


A. You Are Given Two Binary Strings...
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1010
11
10001
110
1
1
1010101010101
11110000
Output
1
3
0
0
----------------------------------------------------------------------------------------------------
B. You Are Given a Decimal String...
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
0840
Output
-1 17 7 7 7 -1 2 17 2 7 
17 17 7 5 5 5 2 7 2 7 
7 7 7 4 3 7 1 7 2 5 
7 5 4 7 3 3 2 5 2 3 
7 5 3 3 7 7 1 7 2 7 
-1 5 7 3 7 -1 2 9 2 7 
2 2 1 2 1 2 2 2 0 1 
17 7 7 5 7 9 2 17 2 3 
2 2 2 2 2 2 0 2 2 2 
7 7 5 3 7 7 1 3 2 7 
----------------------------------------------------------------------------------------------------
C. You Are Given a WASD-string...
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
DSAWWAW
D
WA
Output
8
2
4
----------------------------------------------------------------------------------------------------
D. Print a 1337-string...
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
6
1
Output
113337
1337
----------------------------------------------------------------------------------------------------
E. You Are Given Some Strings...
time limit per test: 3 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
aaabacaa
2
a
aa
Output
5
Input
aaabacaa
4
a
a
a
b
Output
33
----------------------------------------------------------------------------------------------------
F. You Are Given Some Letters...
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 4
Output
4
Input
5 3
Output
5
----------------------------------------------------------------------------------------------------
