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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 160 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | Dominater069 | 154 |
8 | awoo | 154 |
10 | luogu_official | 151 |
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