Is This a Zebra?
926C1700· expert1s256 MB⌨ stdin/stdout
Examples
Sample 1of 5
Input
90 0 0 1 1 1 0 0 0
Output
YES
Sample 2of 5
Input
70 0 0 1 1 1 1
Output
NO
Sample 3of 5
Input
51 1 1 1 1
Output
YES
Sample 4of 5
Input
81 1 1 0 0 0 1 1
Output
NO
Sample 5of 5
Input
91 1 0 1 1 0 1 1 0
Output
NO
58%
926C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)