copyPasteCoder's blog

By copyPasteCoder, history, 6 months ago, In English

For problem 1692H - Gambling, I submitted the solution 266357811. My algorithm keep tracks of all numbers that are currently profitable. If any of them become unprofitable at any point, I stop tracking that number.

I would like to perform a proper time complexity analysis for my solution, but I am uncertain about how to proceed. Could anyone assist me with this?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By copyPasteCoder, history, 7 months ago, In English

Hi Codeforces community,
I want to start practicing on SPOJ or UVa. I don't know how to start or which judge to choose, or which problems to start with. Please help.

Thanks in advance.

Full text and comments »

  • Vote: I like it
  • -18
  • Vote: I do not like it

By copyPasteCoder, history, 9 months ago, In English

This was the Problem E for Codeforces Round 935. For this problem, while going through comments I found ankan2526 has a alternative and easy solution by randomly picking an index, swapping it with index of x and checking if this swap is an answer. But I didn't understand why will this algorithm halt or even give an AC in 2s. I applied the same concept but got a TLE. My submission.

Please tell where I got wrong, and how this submission works perfectly fine. Also, please comment any good links for learning the complexity analysis of such algorithms.

Full text and comments »

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