I submitted solution 77669161 for problem 2B - The least round way and got TLE at test case 31 and not able to find reason. Could anyone help me in finding why it is getting tle error.
# | User | Rating |
---|---|---|
1 | tourist | 3947 |
2 | jiangly | 3734 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | ecnerwala | 3581 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | ksun48 | 3479 |
# | User | Contrib. |
---|---|---|
1 | awoo | 162 |
2 | maomao90 | 160 |
3 | nor | 156 |
4 | cry | 155 |
4 | adamant | 155 |
4 | atcoder_official | 155 |
4 | -is-this-fft- | 155 |
8 | maroonrk | 153 |
9 | SecondThread | 147 |
10 | Petr | 146 |
I submitted solution 77669161 for problem 2B - The least round way and got TLE at test case 31 and not able to find reason. Could anyone help me in finding why it is getting tle error.
Name |
---|
Hey, I couldn't figure out why you TLE (I've been looking at your code for 15+ mins). Instead, I'll share my code that ACed, and hopefully you can compare and figure out.
PS: I really liked this problem when I first read it (maybe last month), and it's been one of my favourites till now.
thanks, I found out reason of tle as I didn't noticed numbers of grid can be zero also,my silly mistake :(