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

Автор JigolKa, история, 12 месяцев назад, По-английски

Hello Codeforces,

I'm still learning binary search, and I can't understand why my implementation doesn't work for 1805C - Place for a Selfie I'm pretty sure my math is correct but maybe it's not. Here is the link to Desmos to visualize it.

Here is my latest submission 316427863. Basically, l and r are the slopes at which y=l*x and y=r*x intersect with the parabola. That's when I try to search the first element l<x<r with binary search.

Thanks for your time

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

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

Автор JigolKa, история, 16 месяцев назад, По-английски

Hello,

I don't understand why my solution got a TLE for problem B. Here is the solution I came up with during the contest: 299645061. I'm quite sure the complexity is O(nlogn) but maybe I'm wrong. Here is another solution that doesn't use del: 299814673 even though if I remember correctly the complexity of del is O(1).

Does anyone have similar results?

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

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

Автор JigolKa, история, 21 месяц назад, По-английски

https://mirror.codeforces.com/contest/1526/submission/276695133

It outputs YES YES NO on my computer but YES NO NO on codeforces, for the first test case.

Can somebody help me figure it out? Thanks

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

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