sidchelseafan's blog

By sidchelseafan, 11 years ago, In English
  • Vote: I like it
  • -14
  • Vote: I do not like it

»
11 years ago, # |
  Vote: I like it +15 Vote: I do not like it

Please, use correct code formatting like this: ~~~~~
int c = 0;
~~~~~

int c = 0;

You can also make a direct link to your submission like this:
[submission:6306167]
6306167

»
11 years ago, # |
  Vote: I like it +3 Vote: I do not like it

here is your code with correction. Your binary search was faulty.

http://codeforces.me/contest/415/submission/6306312

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

Thank you man.! Could you please tell me where i was going wrong.? and possible improvements. Again thanks a lot.:)

  • »
    »
    11 years ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    You declared your "strt" of binary search to be 1. It should be 0.

    You are welcome. PS: I'm also from BITS btw. =P Pilani campus.