For Problem D , why the solution is giving MLE when according to given constraint dp size is maximum 2*1e5*10 < 1e7. https://codeforces.net/contest/1992/submission/270048258
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | gyh20 | 3447 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 161 |
2 | awoo | 160 |
2 | maomao90 | 160 |
4 | atcoder_official | 157 |
5 | -is-this-fft- | 155 |
5 | nor | 155 |
7 | adamant | 153 |
8 | maroonrk | 152 |
8 | Um_nik | 152 |
10 | djm03178 | 146 |
For Problem D , why the solution is giving MLE when according to given constraint dp size is maximum 2*1e5*10 < 1e7. https://codeforces.net/contest/1992/submission/270048258
Название |
---|
Auto comment: topic has been updated by one_by_zero_ (previous revision, new revision, compare).
see you have 2 states in your dp. Mainly N and K (swims in your case) both can be 2*10^5 so total in worst case is >10^9 Actually you could have taken m because m is less than 10 Anyways u dont need both k and m in and can just do in n space. Check my solution and let me know if u want me to explain
btw my dp finds min number of k needed to get past river and if thats more than k then u cant else can
Thanks bro . I misread the question constraints actually.