Qualification Rounds
868C1500· specialist2s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
5 31 0 11 1 01 0 01 0 01 0 0
Output
NO
Sample 2of 2
Input
3 21 01 10 1
Output
YES
58%
868C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
5 31 0 11 1 01 0 01 0 01 0 0
NO
3 21 01 10 1
YES