Блог пользователя Dream_Coder10

Автор Dream_Coder10, история, 3 года назад, По-английски

How can I generate all prime numbers in range 1-10^12...

==================

I Tried with segmeted sieve, but I am not getting values over 10^6... Please give me the instructions or the modified segmented sieve code(it will be really helpful if you give me the code) so that I can learn by debugging it..!!

Problem => https://paste.ubuntu.com/p/TGd3NrfJS8/

Thanks in Advance..!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -29
  • Проголосовать: не нравится

Автор Dream_Coder10, история, 3 года назад, По-английски

why moduler multiplicative inverse is not working under modulo 1000000007 by fermats littile theorem ? let n=11 & k=3 ; n/k should be equal to 3. but its giving me 666666675. same thing goes for n=10 & k=4;

problem:

https://paste.ubuntu.com/p/vgTZcHQ8Rv/

my code:

https://paste.ubuntu.com/p/s2m5q4JtMs/

Полный текст и комментарии »

  • Проголосовать: нравится
  • -26
  • Проголосовать: не нравится

Автор Dream_Coder10, история, 3 года назад, По-английски

Suppose there are two number n & k where 1 <= k <= n <= 1e9 . Now I have to calculate n/k (modulo 1e9 + 7)

==========================================================================================================================

My approach:

I used fermats little theorem to calculate moduler multiplecative inverse & then i printed n*(moduler multiplecitive inv.); But in this approach many test cases like "n=11,k=3" or "n=10 ,k=4" are not working properly & giving me wrong answer..

problem: ( https://paste.ubuntu.com/p/vgTZcHQ8Rv/ ) what I have to modify in this code ( https://paste.ubuntu.com/p/T2h9CsjpXx/ )?

Thanks in advance

Полный текст и комментарии »

  • Проголосовать: нравится
  • -22
  • Проголосовать: не нравится

Автор Dream_Coder10, история, 4 года назад, По-английски

(https://codeforces.com/contest/1360/submission/90406376)

In this submission "char a[60][60]" written before "int main()" and for two dimensional character array inpute taken in one dimensionally...

I wrote char a [60][60] inside "int main()" & took input in two dimensionally "cin>> a[i][j]" , I did not get any errors in my compiler(codeblocks) but Codeforces Showed me judgemental error..... But after submitting the above code,it has accepted!!!....

Can anyone explain me why this has happened?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

Автор Dream_Coder10, история, 4 года назад, По-английски

How to block a user? Or how to hide from the user? Or how can I change my handle?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +8
  • Проголосовать: не нравится