https://codeforces.me/contest/1485/submission/118904427 i have tried a lot still dont get my mistake please help ,why it is wrong ans in which type of test cases it will not work
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3839 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | Geothermal | 3569 |
7 | cnnfls_csy | 3569 |
9 | ecnerwala | 3494 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | Um_nik | 164 |
2 | maomao90 | 160 |
3 | -is-this-fft- | 159 |
4 | atcoder_official | 158 |
4 | awoo | 158 |
4 | cry | 158 |
7 | adamant | 155 |
8 | nor | 154 |
9 | Dominater069 | 151 |
9 | maroonrk | 151 |
https://codeforces.me/contest/1485/submission/118904427 i have tried a lot still dont get my mistake please help ,why it is wrong ans in which type of test cases it will not work
Название |
---|
Try
https://codeforces.me/contest/1485/submission/118912095 it is still wrong in same test case though i edited according to your comment and previous code was and this was also correct for the case l=1,r=n
Your case $$$l = r = n$$$ is different from $$$l = r = 1$$$, but those cases should be equivalent (they are symmetric).
If $$$l = r = n$$$, you should print $$$k-1$$$.
Have you tried the following:
98% of WAs and REs can be resolved this way. People here don't have the time to delve into every code posted here, it's much harder to debug somebody else's code and being able to debug your own code is a valuable skill. It is also a very routine process that can be learned much faster than problem solving and algorithms.
Bonus fact: test $$$5$$$ was initially in the pretests, then I decided to remove it to avoid the queue :(
Because of this, pretests were weak and $$$20\%$$$ of the solutions of this problem failed on system tests.