Hi, Just take look how I solved 242E — XOR on Segment
here is my code
the time limit for this problem is 4000ms and the running time for my code is 4000ms :) :] :D
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Hi, Just take look how I solved 242E — XOR on Segment
here is my code
the time limit for this problem is 4000ms and the running time for my code is 4000ms :) :] :D
Name |
---|
You are really king of numbers :D Nice submit!
Thanks bro.
nice (:
:|
Same kind of thing happened on SRM 543. A loop from 1 to 4*10^9 passed system tests(and hacks) within 2 secs. link
I guess the 'count' and 'tmp' variables are used to reduce additions to 'sum', which is long long. Nice work!
exactly, without this the code will get TLE!
Even faster :http://www.codeforces.com/contest/242/submission/3699657
faster cuz it doesnt check for [code]count == 2000[/code] every r-l+1 times ;)
sorry, but this is not interesting, at least for me.
:D
sorry boss I didn't mean to be a bother.
please give me one more chance :D:D
:|
no extra chances , you're fired :)
I think the major reason is compiler optimisation. It's so cool what a compiler can actually do :).
Weak test case only, try 10^5 query like this
TLE please
I am sure that there was such test. I just checked on my PC, solution really solves it in about 4 seconds.
No TLE :-ss can you explain why ??? 10^10 solved in 4s with code like this ??
look at test 38 , similar to this and solved in 4s.
Why the code is correct? Why not TL?
maby you can try to use segtree ?
this is the interesting issue that makes me create this blog