although i know theres an editorial available , could anyone tell me where does my code actually fail? question — 1003D - Coins and Queries my solution — 142604704
# | User | Rating |
---|---|---|
1 | tourist | 3671 |
2 | jiangly | 3653 |
3 | Um_nik | 3629 |
4 | Benq | 3513 |
5 | ksun48 | 3486 |
6 | MiracleFaFa | 3466 |
7 | slime | 3452 |
8 | maroonrk | 3422 |
9 | Radewoosh | 3406 |
10 | greenheadstrange | 3393 |
# | User | Contrib. |
---|---|---|
1 | awoo | 187 |
2 | YouKn0wWho | 182 |
3 | -is-this-fft- | 181 |
4 | Um_nik | 178 |
5 | Monogon | 177 |
6 | antontrygubO_o | 171 |
7 | maroonrk | 165 |
8 | adamant | 164 |
9 | SecondThread | 162 |
10 | SlavicG | 161 |
Name |
---|
Check this input:
5 1
4 2 2 2 2
10
It seems, that you don't use coin "4" inside your cycle (:
Fixed solution: 142628659
thanks a lot bro for taking time out! just asking for a suggestion, how did you rectify this test case, i mean i had tried all possible test cases and was getting the right answer everytime. yeah ofcourse, it depends on ones thinking capabilities too, but still any piece of advice on figuring out these tiny errors? also i don't think my solution should be getting a TLE, please help out in this one too, thanks ! 142661957
I don't know, that was a second test that came to my mind yesterday :D
You've made a stupid mistake, another fixed solution: 142682254
You don't check, that variable 'c' equals to zero after subtraction. In some testcases it leads to infinite loop :)
thanks so much brother !