You are not logged in. Please login at www.codechef.com to post your questions!

×

What are the compiler options that the judge uses?

2
5

Some languages are weirdly slow on some problems. Do they have optimization enabled/disabled while compiling? Does the online judge use any specific options while compiling my program? Is there a way for me to know what these options are for different languages?

asked 01 Nov '12, 16:55

anup's gravatar image

1★anup ♦♦
2.2k263842
accept rate: 23%

edited 01 Nov '12, 16:56

3

I wonder if you want to specify -Xss for Java as well

(02 Nov '12, 22:29) EgorK4★

The compiler options the judge uses for various languages are:

  • C++

g++ -O2 -fomit-frame-pointer -o prog prog.cpp

  • Java

on pyramid: NONE

on cube: java -Xmx1280M -Xms128M -jar solution.jar

  • C

gcc -O2 -fomit-frame-pointer -o prog prog.c

  • C99 strict

gcc -Werror -pedantic-errors -std=c99 -O2 -fomit-frame-pointer -o prog prog.c

  • C++

g++ -O2 -fomit-frame-pointer -o prog prog.cpp

  • C++ 11

g++ -std=c++0x -O2 -fomit-frame-pointer -o prog prog.cpp

  • Pascal

gpc -O2

  • Fortran

gfortran -O3

  • ADA 95

-O2

  • Icon

-p'-O3'

  • Scheme

-copt -fomit-frame-pointer

  • Haskell

-O

  • Pascal

-O2 -Sc

For languages that are not listed above we don't use any optimization flags.

link

answered 01 Nov '12, 17:13

admin's gravatar image

0★admin ♦♦
15.4k347484505
accept rate: 35%

edited 10 Oct '14, 14:42

how to run .java file with this optimization?

(12 Oct '14, 03:08) shubham0115★

Python import psyco psyco.full()

link

answered 01 Apr '16, 20:12

vsltech's gravatar image

0★vsltech
1
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×167
×4
×1

question asked: 01 Nov '12, 16:55

question was seen: 21,548 times

last updated: 01 Apr '16, 20:12