Skip to content

水筒 (Water Bottle)

Unrated
日本語

Language

Contribute a translation
Time limit
5000 ms
Memory limit
512 MB
Submissions
0
Correct
0
Solved by
0
AC rate
—

Statement

水筒 (Water Bottle):公式日本語問題文 1ページ

水筒 (Water Bottle):公式日本語問題文 2ページ

水筒 (Water Bottle):公式日本語問題文 3ページ

水筒 (Water Bottle):公式日本語問題文 4ページ

水筒 (Water Bottle):公式日本語問題文 5ページ

Examples

Sample input 1
5 5 4 4
.....
..##.
.#...
..#..
.....
1 1
4 2
3 3
2 5
1 2
2 4
1 3
3 4
Sample output 1
3
4
4
2
Sample input 2
5 5 3 2
...#.
..#..
#....
.##..
...#.
1 3
5 2
1 5
1 2
1 3
Sample output 2
-1
7

Notes

Tags

No tags yet

Source