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 | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | 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 | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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