4 / 4
Sep 2010

I have written a haskell solution for this problem which is giving a TLE.
Now, in my pc compilation using -O2 solves the problem in 0.3 sec
whereas without it it takes 2.5sec. Can the program be compiled using -O2?

  • created

    Aug '10
  • last reply

    Aug '10
  • 3

    replies

  • 343

    views

  • 2

    users

Done, now programs are being compiled with '-O2':

ghc6 -o tested tested.hs -O2 --make

Is it ok?

But I think, maybe your pc is a little faster than SPOJ checker...?

[quote="japi"]Done, now programs are being compiled with '-O2':

ghc6 -o tested tested.hs -O2 --make

Is it ok?

But I think, maybe your pc is a little faster than SPOJ checker...?[/quote]

It is still giving me a TLE...
But I will take your word for it. I have to optimize my code further..
Can I know how long it took to run in the spoj machine?