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 | ecnerwala | 3648 |
2 | Benq | 3580 |
3 | orzdevinwang | 3570 |
4 | cnnfls_csy | 3569 |
5 | Geothermal | 3568 |
6 | tourist | 3565 |
7 | maroonrk | 3530 |
8 | Radewoosh | 3520 |
9 | Um_nik | 3481 |
10 | jiangly | 3467 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 174 |
2 | adamant | 164 |
2 | awoo | 164 |
4 | TheScrasse | 160 |
5 | nor | 159 |
6 | maroonrk | 156 |
7 | -is-this-fft- | 150 |
8 | SecondThread | 148 |
9 | pajenegod | 145 |
9 | orz | 145 |
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