Smooth Sailing (Hard Version)
1920F23000· legendary gm5s1024 MB⌨ stdin/stdout
Examples
Sample 1of 4
Input
9 9 3......................###.....v#......###.......##...v...##.............v........1 19 15 7
Output
303
Sample 2of 4
Input
3 3 5..v.#....1 21 32 32 13 2
Output
00000
Sample 3of 4
Input
14 13 5..........................................vvvvvvv......v.....v......v.###.v......v.#.#.v......v..v..v......v..v..v.......v...v.........vvv............................................1 17 75 64 1013 6
Output
30102
Sample 4of 4
Input
10 11 4.............#######....#..#..#....#.....#....#..v..#....#.###.#....#.#.#.#....#...#.#....#####.#.............7 63 76 81 1
Output
1234
58%
1920F2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…