To count number of quadruplets with sum = 0
Paul Rubin
http
Fri Mar 16 02:09:55 EDT 2007
"n00m" <n00m at narod.ru> writes:
> Two first outputs is of above (your) code; next two - of my code:
Yeah, I see now that we both used the same algorithm. At first glance
I thought you had done something much slower. The 10 second limit
they gave looks like they intended to do it about this way, but with a
compiled language. 68 seconds isn't so bad for 4000 entries in pure
CPython. Next thing to do I think is use psyco or pyrex.
More information about the Python-list
mailing list