Balance (Hard version)
1732D22400· grandmaster3s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
18+ 1+ 2? 1+ 4? 2+ 6? 3+ 7+ 8? 1? 2+ 5? 1+ 1000000000000000000? 1000000000000000000- 4? 1? 2
Output
3633103200000000000000000034
Sample 2of 2
Input
10+ 100? 100+ 200? 100- 100? 100+ 50? 50- 50? 50
Output
20030010010050
58%
1732D2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)