iit_ya_ism's blog

By iit_ya_ism, history, 5 years ago, In English

I was doing question fill the baghaving submission 73494540 but error in coming in 275th test case and not able to find error by my own can someone find the logical error in the code , my submission logic is quite similar to that of editorial.

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

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

Auto comment: topic has been updated by iit_ya_ism (previous revision, new revision, compare).

»
5 years ago, # |
  Vote: I like it +6 Vote: I do not like it
while(x > c)
{
     s.insert(x/2);
     s.insert(x/2);
     x/=2;
     ans++;
}

in this loop insert x/2 only one time ..it will pass