### Achha...ji's blog

By Achha...ji, history, 8 days ago,

This is the error I am getting while I am submitting the code for this problem , and I am not able to figure out the problem as it is giving correct answer on my computer's compiler (GNU GCC) . If someone can identify the cause of the issue please look after it. Here is the link to my solution: https://codeforces.com/contest/230/submission/98808853

• -1

 » 8 days ago, # |   0 Rewrite if(soe[t.first] && t.second) as if(t.second && soe[t.first])
•  » » 7 days ago, # ^ |   0 @actium Bro I made this change now it isn't showing that error , but it is returning wrong answer for the square root calculation...and again the same is working totally fine in my compiler.... Still confused
 » 7 days ago, # |   0 Initialise res value in sqrt_binary function. If the while loop doesn't execute you will have the uninitialized value usage because res was never assigned any value.
•  » » 5 days ago, # ^ |   0 Still not working out...even after initializing the res value
 » 5 days ago, # |   0 The sieve is wrong for(ll j = (ll)i*i ; j <= maxN ; j += i) { soe[j] = 0; } Take a look at this line for(ll j = (ll)i*i ; j <= maxN ; j += i), you are starting at $i^2$ instead of $2i$.