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

Автор dog_mage, история, 9 лет назад, По-английски

Link :https://online.acmicpc.org/problems/ceiling

I had an idea to solve this problem in O(n^2) by just presenting tree as String.For example we will have 2 trees(both used to compare each other).If we have List : 5 6 3 9 the string representation of this tree wouls be "RLRR" which means they were added in the tree in following order.After i build both trees i would check if they have same property(amount of L's and R's) if that is the case i would mark those trees the same.

My soulution is giving WA on 7th case and i wonder what it is?

Thanks

Полный текст и комментарии »

Теги acm
  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится