ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1513. Lemon Tale

IF N=K?
Posted by CHIDEMYAN SERGEY 31 Aug 2007 18:15
What should I do,when n=k.For example n=k=3
Possible ways
LBL
BLB
BBB
BBL
LBB
LLB

AND
LLL.
Should I count LLL too?
Problem says:
заменить некоторые «лимоны» на гораздо более политкорректные «бананы» таким образом, чтобы задача всё-таки была допущена к контесту. Сколькими способами это можно сделать?
I think I shouldn't count LLL too.Am I right?
Thank!

Edited by author 31.08.2007 18:17
Re: IF N=K?
Posted by Vedernikoff Sergey 31 Aug 2007 22:11
Read the problem statement carefully:

"if a word "lemon" occurs more than K times successively, the problem will be immediately disqualified from the contest"

Why don't you count case LLL and (what is more strange) case BLL??? They both satisfy problem statement requirement. Right answer for test 3 3 is 8.
Re: IF N=K?
Posted by Search 31 Aug 2007 23:56
Thank you very much!
Re: IF N=K?
Posted by CHIDEMYAN SERGEY 31 Aug 2007 23:57
Thank you very much!!!It helps me.P.S.I forget BLL.

Edited by author 31.08.2007 23:58