Hi Codeforces, I don't know why
http://mirror.codeforces.com/contest/342/submission/38203946 give me TLE
http://mirror.codeforces.com/contest/342/submission/38204186 give me AC
Hope you help me to explain why the first one give me TLE. Thanks.
# | User | Rating |
---|---|---|
1 | tourist | 3803 |
2 | jiangly | 3707 |
3 | Benq | 3627 |
4 | ecnerwala | 3584 |
5 | orzdevinwang | 3573 |
6 | Geothermal | 3569 |
6 | cnnfls_csy | 3569 |
8 | Radewoosh | 3542 |
9 | jqdai0815 | 3532 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 164 |
2 | awoo | 163 |
3 | adamant | 162 |
4 | maroonrk | 152 |
5 | -is-this-fft- | 151 |
6 | nor | 150 |
7 | atcoder_official | 147 |
8 | TheScrasse | 146 |
9 | Petr | 145 |
10 | SecondThread | 142 |
Hi Codeforces, I don't know why
http://mirror.codeforces.com/contest/342/submission/38203946 give me TLE
http://mirror.codeforces.com/contest/342/submission/38204186 give me AC
Hope you help me to explain why the first one give me TLE. Thanks.
Name |
---|
Auto comment: topic has been updated by EternalFire (previous revision, new revision, compare).
Your first submission got TLE, because works in O(n * sqrt(n) * log n), it shouldn't get AC.
Your second submission got AC, because ... because.