Spiral Maximum
173C1900· candidate master3s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
6 50 0 0 0 01 1 1 1 10 0 0 0 11 1 1 0 11 0 0 0 11 1 1 1 1
Output
17
Sample 2of 3
Input
3 31 1 11 0 01 1 1
Output
6
Sample 3of 3
Input
6 6-3 2 0 1 5 -14 -1 2 -3 0 1-5 1 2 4 1 -20 -2 1 3 -1 23 1 4 -3 -2 0-1 2 -1 3 1 2
Output
13
58%
173C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)