I try to solve problem SEQN.

My program works about 0.3 sec in my computer with "-O2" or "-O3" optimization option (in that task it's need 3 seconds)
But with option "-O0" (or without any optimizations) it run about 1 minute.

So, when I submit my solution, I hope that it pass, but it return TLE! frowning (in spite of {-# OPTIONS_GHC -O3 -optc-O3 #-} in header)

How can I set up options for submit?

  • created

    May '11
  • last reply

    Jul '12
  • 1

    reply

  • 586

    views

  • 2

    users

1 year later

I'm probably too late for you, but in case anyone else was wondering, the issue here is that the OPTIONS_GHC pragma isn't supported by SPOJ's ancient version of the compiler. You need to use OPTIONS (now deprecated) instead. And before you ask, the -with-rtsopts flag doesn't exist in any form in this version, so you can't tweak your GC parameters. Oh, and -fvia-c doesn't work either (apparently something is missing from their GHC package) and of course -fvia-llvm doesn't exist because that came out in 2010 or 2011. Basically, there's not much chance of getting on the first page of the rankings in Haskell right now.