potter's blog

By potter, history, 3 years ago, In English

Hey everyone, I am looking for a team I can join for hash code. This is my first hash code so I will learn a lot.

If anyone has space in their team let me know, or If someone wanna join mine, hit me a dm.

Thanks.

Full text and comments »

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

By potter, history, 3 years ago, In English

PROBLEM

So I came across this problem and I would like to implement and idea that after removing values that are directly divisible by 3 and the pairs that add upto sum (divisible by 3), the rem. ones may have some kind of combination of elements with sum adding upto 3

Example:

arr = [1,1,1,1,1,2,2]

after two operations , pairs gets out [1,2],[1,2] with sum(%3==0)

rem = [1,1,1]

Now, how to know that rem array may have some combinations sum divisible by 3?

Full text and comments »

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

By potter, history, 3 years ago, In English

I have tried sieve and segmented sieve too but they are slow. Can anyone provide code to print primes till 10^9 FAST?

Python code would be a great help.

Full text and comments »

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

By potter, history, 3 years ago, In English

This is the question Link

Test 6

There is a diff of 2. Can anyone look why my code is wrong?

Code

Full text and comments »

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

By potter, history, 3 years ago, In English

Hey everyone, I just wanted to ask any roadmap which I can follow to become great like you guys in cp. I know everything is achieved by practice but I wanna know what to practice and what resources to look up to.

Can anyone suggest some good tips???

Full text and comments »

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