Codeforces Round 292 (Div. 2)


A. Drazil and Date
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 5 11
Output
No
Input
10 15 25
Output
Yes
Input
0 5 1
Output
No
Input
0 0 2
Output
Yes
----------------------------------------------------------------------------------------------------
B. Drazil and His Happy Friends
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 3
0
1 0
Output
Yes
Input
2 4
1 0
1 2
Output
No
Input
2 3
1 0
1 1
Output
Yes
----------------------------------------------------------------------------------------------------
C. Drazil and Factorial
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1234
Output
33222
Input
3
555
Output
555
----------------------------------------------------------------------------------------------------
D. Drazil and Tiles
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 3
...
.*.
...
Output
Not unique
Input
4 4
..**
*...
*.**
....
Output
<>**
*^<>
*v**
<><>
Input
2 4
*..*
....
Output
*<>*
<><>
Input
1 1
.
Output
Not unique
Input
1 1
*
Output
*
----------------------------------------------------------------------------------------------------
E. Drazil and Park
time limit per test: 2 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
5 3
2 2 2 2 2
3 5 2 1 4
1 3
2 2
4 5
Output
12
16
18
Input
3 3
5 1 4
5 1 4
3 3
2 2
1 1
Output
17
22
11
----------------------------------------------------------------------------------------------------
