I am unable to find out why binary search wont work with this problem Apartments. My Solution using BS:Solution
# | User | Rating |
---|---|---|
1 | tourist | 3757 |
2 | jiangly | 3647 |
3 | Benq | 3581 |
4 | orzdevinwang | 3570 |
5 | Geothermal | 3569 |
5 | cnnfls_csy | 3569 |
7 | Radewoosh | 3509 |
8 | ecnerwala | 3486 |
9 | jqdai0815 | 3474 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 171 |
2 | awoo | 165 |
3 | adamant | 163 |
4 | TheScrasse | 159 |
5 | maroonrk | 155 |
6 | nor | 154 |
7 | -is-this-fft- | 152 |
8 | Petr | 147 |
9 | orz | 146 |
10 | pajenegod | 145 |
I am unable to find out why binary search wont work with this problem Apartments. My Solution using BS:Solution
I have been trying this question 1895C - Порванный счастливый билет and my approach seems to be somewhat aligned with the tutorial but i m not getting AC due to some error in my code 241201430 .Please tell me where i got wrong with the solution.
Can someone please help me out with the solution of this problem "Natsya decided to visit a local store, which has n items. The i-th item has price a[i]
She has to buy k items out of the n items such that total price of all the items bought is minimum.
In how ways she can buy k items such that the overall price is minimum?"
1<=k<=n<=50 a[i]<=n
I have tried to solve it but it is failing in some hidden cases Code.
I have been stuck on the problem and this is best solution i could think and it has failed Question:String Generator My Solution:Based on two pointers checking right and left Please help me and where my solution was wrong and how can it be improved as i havent found an answer to the problem...
I need help in solving a question Question A ,also i tried too hard to understand how to do it from video but couldnt understand it properly...
Name |
---|