Codeforces Beta Round 96 (Div. 2)


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

Examples
Input
Hi!
Output
YES
Input
Codeforces
Output
NO
----------------------------------------------------------------------------------------------------
B. Unary
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
,.
Output
220
Input
++++[>,.<-]
Output
61425
----------------------------------------------------------------------------------------------------
C. Turing Tape
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
Hello, World!
Output
238
108
112
0
64
194
48
26
244
168
24
16
162
----------------------------------------------------------------------------------------------------
D. Piet
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 10
12
43
Output
1
Input
3 12
1423
6624
6625
Output
6
Input
5 9
10345
23456
34567
45678
56789
Output
5
----------------------------------------------------------------------------------------------------
E. Logo Turtle
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
FT
1
Output
2
Input
FFFTFFF
2
Output
6
----------------------------------------------------------------------------------------------------
