sourav_malo's blog

By sourav_malo, history, 8 years ago, In English

As you know that Educational Codeforces Round 54 (Rated for Div. 2) was held yesterday. Perhaps, you solved 1076B - Divisor Subtraction without any difficulty. Now, I am thinking how to solve this problem if there are no less than 10^5 queries. Please, mention the complexity with approach.

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

| Write comment?
»
8 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

owowow

»
8 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

if you lower the limit of n to 1e7 than you can have as many queries as you want, but i dont think 1e10 is gonna do well for more than 100 queries...

  • »
    »
    8 years ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    There are around 1e4 primes lesser than 1e5 so you can optimize it to work for around 1e4 queries (and maybe faster with pollard rho?)

»
8 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Has there any way to find at least a divisor of n smaller than sqrt(n) within at most 1000 loops where n<=10^10?

  • »
    »
    8 years ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    Isn't this question equivalent to integer factorization at the worst case? Then, I suppose there are no known way to do the task in 1000 loops...