Блог пользователя S.J.patel

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

Hi, Question: http://www.spoj.com/problems/FREQUENT/

I am getting WA in my below mentioned Code and i have tried many test Cases but the issue still remains same. Can anybody please help me? My basic logic is that when the best left part and the best right part are both of the same element, then the parent node made from these two parts will have the best made of the same element and frequency equal to the sum of the best left and right frequencies.

And if the best left and best right are not of the same element, then I'll check if the two child segments are internally joined by some common element.

Code: https://ideone.com/uhftBt

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

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