Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

3 8
GM......
......M.
........

Sample Output 1

3

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

5 5 5 2
1 1 1
5 5 5
5 5 5 1
3 3 3
-1

Sample Output 1

YES
1 1 1 5 5 1
1 1 2 5 5 5
YES
1 1 1 5 5 5

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

5 5 5 2
1 1 1
5 5 5
1 1 1 5 5 1
1 1 2 5 5 5
5 5 5 1
3 3 3
1 1 1 5 5 6
-1

Sample Output 1

YES
NO

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

2 5 2
R..?.
.X...
100 100 7 100 8

Sample Output 1

16

Sample Input 2

2 3 1
X..
.?.
10 1000 1

Sample Output 2

10

Sample Input 3

2 3 100
X..
.?.
10 1000 1

Sample Output 3

100

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

H
T
0.5

Sample Output 1

0.5

Sample Input 2

HH
TH
0.5

Sample Output 2

0.25

Time limit: 2.61s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

3 2 3
3 4 5
4 3
5 5 3

Sample Output 1

4

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

3
4 5 6

Sample Output 1

2

Time limit: 2.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

1

Sample Output 1

10

Sample Input 2

2

Sample Output 2

570

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

HH

Sample Output 1

2.0

Sample Input 2

H?

Sample Output 2

1.5

Sample Input 3

??

Sample Output 3

1.5

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

2 3
1 1
1 2
2 2

Sample Output 1

1

Time limit: 1.79s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

2
10 10 20 20
15 15 25 30

Sample Output 1

25

Time limit: 1.0s / Memory limit: 512M

Points: 1

In case the statement didn't load correctly, you can download the statement here: Statement

Sample Input 1

var a = "Gon";
var b = a;
var c = `My name is ${a}`;
print c;
print `My name is ${b}`;
end.

Sample Output 1

My name is Gon
My name is Gon

Sample Input 2

var one = "1";
var two = "2";
var three = "3";
print `${one} + ${two} = ${three}`;
print `1${`2${three}2`}1`;
end.

Sample Output 2

1 + 2 = 3
12321