Equal Sums
988C1400· specialist2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
252 3 1 3 261 1 2 2 2 1
Output
YES2 61 2
Sample 2of 3
Input
31551 1 1 1 122 3
Output
NO
Sample 3of 3
Input
462 2 2 2 2 252 2 2 2 232 2 252 2 2 2 2
Output
YES2 24 1
58%
988C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)