|
|
вернуться в форумWA#4... WHY? My algo is here... I wrote simple Binary search but got WA#4... Where is my mistake? Maybe there are some special cases... Can you help me, please? Thanks in advance... Re: WA#4... WHY? My algo is here... I had wa4 and this test helped me to get AC: 6 1 0 1 0 0 1 6 2 2 1 1 1 1 3 3 1 4 4 1 6 6 1 4 5 1 // correct answer is 011010 Re: WA#4... WHY? My algo is here... Try using the STL lower_bound for binary search. It really cuts down potential errors on edge cases. |
|
|