Masala #ITGRU3AQTW
Shashka o`yini va Zelishmalik
Bugun Zelishmalik shashka o`yinini oynashni organdi. Ustozi uni qay darajada o`rganganligini tekshirish maqsadida unga savol berdi “seni shashkani yurishga nechta variantin bor” dedilar. Siz Zelishmalikka yordam berolasmi.Yani shashkani yurishni nechta varianti bor.Zelishmalik faqat oq shashkada oynaydi.
Sizga 8x8 olchamdagi shashka maydoni v au yerdagi shashkalarni turgan joylari beriladi.Oq rang bu 1, Qora rang esa 0 bo`ladi.
Zelishmalikni nechta varianti bor ekanini toping.Agar shashka oyinidagi shashkalar xato bolsa ‘Error’ so`zini chop eting.
# | input.txt | output.txt |
---|---|---|
1 |
. . . 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . |
2 |
2 |
. . . 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . 1 . . . . . . . . |
3 |
3 |
. . . 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 . . . . . . . . . . . . . . 1 . . . . . . . . . . . . |
Error |
1-testda oq shashka 2 ta katakka yuroladi o`nggga va chapga oshani uchun 2 degan javob chiqardi.Orqaga olishi mumkin emas va damka yo`q.