Frequently Asked Questions

Q: What does "EOJ" stand for?

A: EOJ is the abbreviation for ECNU Online Judge.

Q: Which languages have you supported?

A: We have already supported C, C++, Java, Python(3).

Q: What does a typical solution look like?

A: Here is an A + B Solution for each language:

For language C:

#include <stdio.h>
int main()
    int a, b;
    scanf("%d%d", &a, &b);
    printf("%d\n", a + b);

For language C++:

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

For language Java:

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner cin = new Scanner(;
        int a, b;
        a = cin.nextInt();
        b = cin.nextInt();
        System.out.println(a + b);

For Python:

a, b = map(int, input().split())
print(a + b)
Q: Is there a way to tell whether the environment is on Online Judge or not?

A: For C/C++, macro ONLINE_JUDGE is predefined in the program. For Java and Python, currently, no.

Q: Should I use %lld or %I64d?

A: We are under Linux environment. So definitely %lld.

Q: Is there any another difference on judge strategy between languages?

A: Java has a -150ms bonus on the time record for each test case. Memory display in Java is currently not available (always 0 sadly), but you can still get an error if you ask for too much memory.

Q: Why is my memory status ridiculously high / low?

A: Unfortunately there are no known solution to the memory problem. We are able to get a MLE correctly, but not a memory status. When it comes to Java, this problem gets worse. That's why all memory statuses for Java are 0KB.

Q: What is the length limit of our code?

A: Code should contain no more than 65536 characters.

Q: What is the version of compiler on the server?

A: We have Ubuntu 14.04 on the server, with Java version 1.7.0_121, g++ 4.8.4 and Python 3.4.3. Python 2 is currently not supported on the server.

Q: What are the compile commands?

A: Below are the compile commands for C, C++, Java, Python.

gcc -DONLINE_JUDGE -O2 -w -std=c99 main.c -lm -o main
g++ -DONLINE_JUDGE -O2 -w -fmax-errors=3 -std=c++11 main.cpp -lm -o main
javac -encoding UTF8
python3 -m py_compile
Q: Why did my solution disappear from online status?

A: Normally it is because the problem is hidden, or you have submitted it in a contest.

Q: Can I delete my blog?

A: Currently you can't. You can hide it though. Still, be careful when you create a blog.