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
# | User | Rating |
---|---|---|
1 | tourist | 3947 |
2 | ecnerwala | 3654 |
3 | jiangly | 3627 |
4 | jqdai0815 | 3620 |
5 | orzdevinwang | 3612 |
6 | Benq | 3586 |
7 | Radewoosh | 3582 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | ksun48 | 3474 |
# | User | Contrib. |
---|---|---|
1 | awoo | 163 |
2 | maomao90 | 160 |
3 | adamant | 156 |
4 | atcoder_official | 153 |
5 | maroonrk | 152 |
6 | -is-this-fft- | 148 |
6 | SecondThread | 148 |
8 | Petr | 147 |
9 | nor | 145 |
10 | cry | 144 |
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
Name |
---|
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.