Блог пользователя naivedyam

Автор naivedyam, история, 3 дня назад, По-английски

Here is my idea-

First, I am counting the number of occurrence of AB, BA and overlap. Overlap are those indexes using which we can get both AB and BA. Like using A in BAB I can get both BA and AB. The ABs and BAs made from these indexes aren't counted to my count of ABs and BAs.

Next, I am getting rid of overlap by converting it to either AB or BA. If count of AB is less than the given limit for it, then I am converting as much overlaps into AB as I can such that AB doesn't exceed its limit. For all the remaining overlaps I am converting it to BA.

Next, for all the extra ABs and BAs I am left with now, I am converting them to an independent A and an independent B. If the final count of all independent As and Bs are less than or equal to the given limit, my answer is yes else no. I don't see anything wrong with it since I am redistributing as many ABs and BAs as I can to those respective things. Is there a logical flaw in my approach?

Here is my submission — 306805586

  • Проголосовать: нравится
  • -9
  • Проголосовать: не нравится

»
3 дня назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

1 BABA 0 0 500 0 WA