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


What are the compiler options that the judge uses?


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

2★anup ♦♦
accept rate: 23%

edited 01 Nov '12, 16:56


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


  • Icon


  • Scheme

-copt -fomit-frame-pointer

  • Haskell


  • Pascal

-O2 -Sc

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


answered 01 Nov '12, 17:13

admin's gravatar image

0★admin ♦♦
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()


answered 01 Apr '16, 20:12

vsltech's gravatar image

accept rate: 0%

toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 01 Nov '12, 16:55

question was seen: 21,910 times

last updated: 01 Apr '16, 20:12