can anyone tell me why my code gives tle and hows i can remove this i apply mo algo correctly for this than why this gives me tle http://codeforces.com/contest/703/submission/19736475 thanx in advance
# | User | Rating |
---|---|---|
1 | tourist | 3882 |
2 | maroonrk | 3539 |
3 | Benq | 3513 |
4 | MiracleFaFa | 3466 |
5 | ksun48 | 3462 |
6 | ecnerwala | 3446 |
7 | slime | 3428 |
8 | Um_nik | 3426 |
9 | jiangly | 3401 |
10 | greenheadstrange | 3393 |
# | User | Contrib. |
---|---|---|
1 | awoo | 192 |
2 | -is-this-fft- | 191 |
3 | Monogon | 184 |
4 | YouKn0wWho | 182 |
4 | Um_nik | 182 |
6 | antontrygubO_o | 171 |
7 | maroonrk | 169 |
8 | kostka | 165 |
9 | SecondThread | 164 |
9 | errorgorn | 164 |
Name |
---|
It gives tle because MO's algorithm is not the intended solution for this problem. The number of queries is very large. This problem can be solved using segment trees or BIT.
thanx alot for telling me this point i solve it using another approach