Judge Status

Q.What is ACM/ICPC?

A. ACM International Collegiate Programming Contest (abbreviated as ACM/ICPC or just ICPC) is an annual activity of the Association for Computing Machinery (ACM) that provides college students with an opportunity to demonstrate and sharpen their problem-solving and computing skills. The event is sponsored by IBM. See http://icpc.baylor.edu/ for details.

Q.What is this site all about?

A. This web site is found to to be a place where ACM/ICPC's contestants can share their resources and ideas with others. Currently, this site consisits of a Problem Set Archive with Online Judge, a Discuss Board where people discuss ACM/ICPC related topics, as well as many Downloadable Materials.

Q.Which compiler does the judge use and what are the compiler options?

A.This online judge system is running on Redhat Linux. We use GNU G++ for C/C++ compiling and JDK 1.5.11 for Java Compiling.
The compile options are:

C:gcc foo.c -o foo -ansi -fno-asm -Wall -lm --static -DONLINE_JUDGE
C++:g++ foo.cpp -o foo -ansi -fno-asm -Wall -lm --static -DONLINE_JUDGE
Java:Javac Main.java

Q.Where is the input and output?

A.Your program shall read input from stdin('Standard Input') and write output to stdout('Standard Output').For example,you can use 'scanf' in C or 'cin' in C++ to read from stdin,and use 'printf' in C or 'cout' in C++ to write to stdout.


Sample solution for problem 1001 using C

#include <stdio.h> int main() { int a,b; while(scanf("%d %d",&a, &b) != EOF) printf("%d\n",a+b); return 0; }

Sample solution for problem 1001 using C++

#include <iostream> using namespace std; int main() { int x,y; while(cin>>x>>y) cout<<x+y<<endl; return 0; }

Sample solution for problem 1001 using Java

import java.io.*; import java.util.*; public class Main { public static void main (String args[]) throws Exception { BufferedReader stdin = new BufferedReader( new InputStreamReader(System.in)); String line; while((line = stdin.readLine()) != null){ StringTokenizer st = new StringTokenizer(line); int a = Integer.parseInt(st.nextToken()); int b = Integer.parseInt(st.nextToken()); System.out.println(a + b); } } }

Sample solution for problem 1001 using JavaScript

var cin = new java.util.Scanner(java.lang.System["in"]);//'in' is key word in js var a; var b; while(cin.hasNext()) { a = cin.nextInt(); b = cin.nextInt(); java.lang.System.out.println((a+b).toString());//toString is neccessary or js Number will be treat as float }

Q.What is the meaning of the judge's feedback such as SIGSEV?

A.Here is a list of the judge's replies and their meaning:


Runtime Error : Your program failed during the execution (segmentation fault, floating point exception...). The exact cause is reported to the user.

SIGSEGV : --- Segment Fault. The possible cases of your encountering this error are:

  1. buffer overflow --- usually caused by a pointer reference out of range.
  2. stack overflow --- please keep in mind that the default stack size is 8192K.
  3. illegal file access --- file operations are forbidden on our judge system.

SIGFPE : --- Divided by 0
You can type man 7 signal under linux command line for more imformation.

Waiting : The judge is so busy that it can't judge your submit at the moment, usualy you just need to wait a minute and your submit will be judged.

Accepted : OK! Your program is correct!.

Presentation Error : Your output format is not exactly the same as the judge's output, although your answer to the problem is correct. Check your output for spaces, blank lines,etc against the problem output specification.

Wrong Answer : Correct solution not reached for the inputs. The inputs and outputs that we use to test the programs are not public.

Runtime Limit Exceeded : Your program tried to run during too much time.

Memory Limit Exceeded : Your program tried to use more memory than the judge default settings.

Compile Error : The compiler (g++) could not compile your program. Of course, warning messages are not error messages. Click the link at the judge reply to see the actual error message.

Restricted Function : Your program tried to call restricted functions , Such as "system","fork".
due to the function "qsort" in C calls Sys_Open and Sys_Time, this function may also cause OJ return as Restricted Function.

Internal Server Error: Something wrong is happend.If you get this result, please contact the administrator.

Q.Why did I get a Compile Error?

A.There are some differences between GNU's G++ and Microsoft's VisualC++, such as: