Negationist's blog

By Negationist, history, 5 weeks ago, In English

Here is an AC submission:

AC

Here is an WA submission:

WA

The only difference is a custom sqrt function. This was my worse contest ever because of this. Wasted like 40 mins trying figure this out and needed like 1 more min to solve C. Someone please explain because this is so weird and frustrating.

  • Vote: I like it
  • +4
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Man both your codes are same :)

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I believe B was too tight on constraints https://mirror.codeforces.com/contest/2020/submission/283621067 Here's my solution you can check. Make hi = 2*k and it would work.

»
5 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

I guess you pasted same codes

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    oh shoot lol youre right, either way i got a good answer

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it
  1. You pasted same code.

  2. I found your submissions.

  3. seems like you didn't consider floating precision error.

  4. here's mine with STL 283569591

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Ok thanks. I will do some research into floating point imprecision and how to avoid it.