1 / 9
Jul 2012

Hi,

encouraged here, I submitted my code in Python 3.1.2 recently. It was a quite simple problem (TRGRID) with very much straight-forward code (O(1)). So I was surprised to see that numerix' code for this problem was 2..3 times faster than mine.

Well, my code is almost always slower, but this difference is strange. On the other hand, I read somewhere in this board, that a former version of Python (2.6) was replaced with python 3.1.2. Is it possible, that numerix achieved his good result with Python 2.6 and is now displayed as Python 3.1.2 (numerix' submission is 2 years old)?

Edit: Hyperlink prettified

  • created

    Jul '12
  • last reply

    Aug '12
  • 8

    replies

  • 254

    views

  • 4

    users

  • 4

    links

At this time, here
Rüdiger has the only python3.1 AC submission, all others shown are python2.6.

How to know ?
The date : before mid(?) 2010 -> python2.6 , after py3.1.
Memory usage : about 3.6Mb py2.6 without psyco, about 33Mb py2.6+psyco, about 5.7 py3.1
the time : 0.11s is near the low limit for py3.1, 0.03s for other Py.

Thanks Francky. So my guess was quite correct. And yes, the python 3.1.2 submission is mine.
Daft (aka Rüdiger)

1 month later

I just noticed that SPOJ doesn't offer Python 2.5 for submitting programs anymore, Python 2.7 is listed instead. Psyco appears to be available on python 2.7 now. Looks promising.

Can anyone of the experts confirm?

I submitted this code on TEST:

import sys
if sys.version[0:3] == "2.5":
   pass
else:
   1/0

and got WA. Conclusion still 2.5. Recently numerix found out that there are two different versions installed and randomly 2.5 or 2.7 is used. Not sure whether this is still the case. I havent done much for a while.

Thanks. This result appears to be clear, interesting code to depict the version - once again I learned a new bit. Since I only tested to submit a small psyco import yesterday, the change in SPOJ probably is just a different label (up to now).
Daft

I submitted code for Model Rocket Height using Psyco and got WA. I didn't notice until I got the result that python 2.5
was no longer available.
On removing the psyco call i got AC.
Does anybody know what the current situation is with regard to python 2.7 and psyco on spoj?

Hi,
psyco appears to work, still. I submitted a bunch of test scripts, most of them using psyco and did not run into NZEC. Only WA and AC. (You can identify where psyco was active in memory usage of 36M)
cheers
Daft

Suggested Topics

Want to read more? Browse other topics in Python or view latest topics.