Пожалуйста, прочтите новое правило об ограничении использования AI-инструментов. ×

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

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

Hello everyone! I am new to competitive coding and asking a rookie query in a blog for the first time so apologies in advance if anything is not according to norms.

I was solving this problem today 1284B - Новый год и восходящая последовательность . Here is the editorial. Idea behind my solution is almost as in editorial. The issue is that my submission with custom function for upper_bound got tle verdict but when I used built in function for the same it got accepted.

I used the concept of binary search in my function so the overall complexity is still O(nlogn) which should get accepted(according to me).

My code for upper_bound func

86441251 is the submission which got tle. 86412015 is the submission which got accepted.

Thanks in advance!

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

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