VSN - Editorial

What I wanted to say was, that constant was based on your N. You wont be using the same 100 iteration for high={10}^{1000}. The doubt I had is, that, this K (where K is no. of iterations) must be \ge logN. Hence I feel its theoretically wrong to call it O(1). Am I right? Or am I missing something? :slight_smile:

1 Like

Yes, that was exactly my point! :slight_smile:

Seems Ok. Will update it in a while.

Thanks :slight_smile: :smiley:

was expecting this… PS: I have tried many solutions for this one… one of them luckily worked…

|PC x PQ'| / |PQ'| == r

You are comparing float here!

1 Like

To be pedantic, it’s not only dependent on t_\text{max} either. It’s more like O(\log(t_\text{max}/\epsilon)).

1 Like

Yes my two solutions giving different outputs passed.

Find the fastest codes with 100 points in submissions… You’ll get your desired solutions :slight_smile:

i.e. sort them according to run time and select “AC”

here is my solution without binary search :slight_smile:

The test data is wrong. It is clearly mentioned that the point Q is not visible at time = 0 from P.

2 Likes

Thanks for pointing out. Updated info.

1 Like

I don’t think test data is wrong…
because distance from line PQ to center is 1.5756771943166707 , you can find out and correct me if i am wrong :slight_smile:

5 start again :smiley: @birjesh_1998

Hi @adzo261, I have followed a similar approach but getting WA. Can you show me your correct submission?

Refer to the 1st comment in the thread. You can also refer to this blog on codeforces.

@zymbio, I saw your solution and it is totally correct. It will TLE just because python is slow. Try submitting in “pypy” or using the number of iterations as 75 (finding the exact number of iterations has been added as link in the editorial)

1 Like

sure! will also go through the link :slight_smile: thanks !!

What? I think I edited that section out for correction xD. Where is it left now? :stuck_out_tongue:

PS: Great blog you found :stuck_out_tongue: