Q : Which programming languages can I use at Online Judge ?
A : C, C++, Java are currently supported at Online Judge.
Q : What are the compiler options ?
A :
  compiler C : gcc -o foo foo.c -static -w -lm -std=c99 -O2 -DONLINE_JUDGE
  compiler C++ : g++ -o foo foo.cpp -static -w -lm -O2 -std=c++11 -DONLINE_JUDGE
  Java : No special options
  Our compiler software version :
  gcc/g++ 4.8.2
  java version "1.7.0_40"
Q : Where is the input and the 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.
    User programs are not allowed to open and read from/write to files, you will get a "Runtime Error" if you try to do so.
    Here is a sample solution for problem 1000 using C++:

    #include <iostream>
    using namespace std;
    int main()
        int a,b;
        while(cin >> a >> b)
            cout << a+b << endl;
        return 0;

    Here is a sample solution for problem 1000 using C:

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

    Here is a sample solution for problem 1000 using Java:

    import java.util.Scanner;
    public class Main {
        public static void main(String[] args) {
            Scanner cin = new Scanner(System.in);
            while (cin.hasNextInt()) {
                int a = cin.nextInt();
                int b = cin.nextInt();
                System.out.println(a + b);
Q : How to use 64-bit integer types ?
A : You can use %lld and %llu with either C/C++ compiler.
Q : How to submit a Java solution ?
A : See the sample solution above. Basically you should submit a single source file which contains a public class Main and it should have a method with signature "public static void main(String[] args)" which is the entry of your program.
Q : What are the meanings of the judge's replies ?
A :
    Waiting : The judge is so busy that it can't judge your solution at the moment.
    Compiling : Your solution is being compiled to binary form by the compiler.
    Running : Your program is running on the server and fed with input data if necessary.
    Accepted : Good!Your program is correct!
    Presentation Error : Your program's output format is not exactly the same as required by the problem, although the output is correct.
    Wrong Answer : Correct solution not reached for the inputs.
    Runtime Error : If you are using Java, please check the class signature as well as the main method signature, and don't use any class which is not allowed. If you are using other languages, your program may have executed a forbidden operation, like invoking privileged syscalls, file operation, etc. Notice that buffer overflow and stack overflow can also lead to this error.
    Time 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.
    Output Limit Exceeded : Your program tried to write too much information.
    Compilation Error : The compiler fails to compile your program. Warning messages are not considered errors. Click on the judge's reply to see the warning and error messages produced by the compiler.
    System Error: The judge cannot run your program. One example is that your program requires much more memory than hardware limitation.