### sidchelseafan's blog

By sidchelseafan, 8 years ago,

• -14

 » 8 years ago, # |   +15 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
 » 8 years ago, # |   +3 here is your code with correction. Your binary search was faulty.http://codeforces.com/contest/415/submission/6306312
 » 8 years ago, # |   0 Thank you man.! Could you please tell me where i was going wrong.? and possible improvements. Again thanks a lot.:)
•  » » 8 years ago, # ^ | ← Rev. 2 →   +3 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.
•  » » » 8 years ago, # ^ | ← Rev. 2 →   0 Which year ?I m in first ..:)
 » 8 years ago, # |   0 this will help you surely: http://sanugupta.wordpress.com/2014/06/05/linear-search-vs-binary-search/