Aden_blizzard's blog

By Aden_blizzard, history, 3 years ago, In English

https://cp-algorithms.com/algebra/prime-sieve-linear.html in this code for sieve in linear time complexity what is the use of pr[j]<=lp[i]? is there any reason to write this as i tried many test case but it works fine without this ....is there any case where it fails?

Full text and comments »

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

By Aden_blizzard, history, 3 years ago, In English

i was practicing this question https://www.codechef.com/problems/COPR16G/ and i found that endl gives TLE but \n doesnot why? is it because endl is flushing after giving a newline?

Full text and comments »

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