New Year and Castle Construction
1284E2500· grandmaster3s1024 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
5-1 01 0-10 -110 -10 3
Output
2
Sample 2of 3
Input
80 11 22 21 30 -1-1 -2-2 -2-1 -3
Output
40
Sample 3of 3
Input
10588634631 265299215-257682751 342279997527377039 82412729145077145 702473706276067232 912883502822614418 -514698233280281434 -4146163565985059 -827653144188538640 592896147-857422304 -529223472
Output
213
58%
1284E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)