Please take a look at our list of video tutorials on YouTube.
The Judge System, which is the program compiling, running and testing system, is running on Debian Linux.
The compilers we use are:
| Language | Compiler | Command used for compilation | Command used for running |
|---|---|---|---|
| C | gcc 4.4.5 glibc 2.11.3 | gcc Main.c -o Main -O2 -Wall -lm --static -std=c99 -DONLINE_JUDGE | ./Main |
| C++ | gcc 4.4.5 glibc 2.11.3 | g++ Main.cc -o Main -O2 -Wall -lm --static -DONLINE_JUDGE | ./Main |
| Pascal | Free Pascal Compiler 2.4.0 | fpc Main.pas -oMain -O1 -Co -Cr -Ct -Ci | ./Main |
| Java | Java 1.6.0 | javac -J-Xms32m -J-Xmx256m Main.java | java Main |
| Ruby | ruby 1.8.7 | ruby -c Main.rb | ruby Main.rb |
| Bash | GNU bash 4.1.5(1)-release | N/A | /bin/bash Main.sh |
| Python | Python 2.7.3 | python -c import py_compile; py_compile.compile(r'Main.py') | python Main.py |
| PHP | PHP 5.3.3 | N/A | php Main.php |
| Perl | Perl 5.10.1 | N/A | perl Main.pl |
| C# | Mono C# compiler 2.6.7.0 | gmcs -warn:0 Main.cs | mono --debug Main.exe |
Yes. Please take a look at the following example programs that can solve Problem 1000:
/* Language: C */
#include <stdio.h>
int main()
{
int a,b;
while(scanf("%d %d",&a, &b) != EOF)
{
printf("%d\n", a + b);
}
return 0;
}
// Language: C++
#include <iostream>
using namespace std;
int main()
{
int a, b;
while(cin >> a >> b)
{
cout << a+b << endl;
}
}
{ Language: Pascal }
program p1000(Input,Output);
var
a,b:Integer;
begin
while not eof(Input) do
begin
Readln(a,b);
Writeln(a+b);
end;
end.
// Language: Java
import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
while (in.hasNextInt())
{
int a = in.nextInt();
int b = in.nextInt();
System.out.println(a + b);
}
}
}
# Language: Ruby
a=gets.chomp
b="0"
a.each_line(" "){
|d|
b=b+"+"+d
}
puts eval(b)
# Language: Bash Shell Script read a b echo $(($a+$b))
# Language: Python import sys for line in sys.stdin: a = line.split() print int(a[0]) + int(a[1])
// Language: PHP
<?php
while (fscanf(STDIN, "%d%d", $a, $b) == 2)
{
print ($a + $b) . "\n";
}
?>
# Language: Perl
#!/usr/bin/perl -w
while(<>)
{
chomp;
($a,$b)=split(/\s/,$_);
printf "%d\n",$a+$b;
}
// Language: C#
using System;
public class Sum
{
public static void Main()
{
for(int k = 0; k < 1; k++)
{
string[] tokens = Console.ReadLine().Split(' ');
Console.WriteLine(int.Parse(tokens[0]) + int.Parse(tokens[1]));
}
}
}
| Message | Description |
|---|---|
| Pending | Your program submission is placed in queue and will get judged soon. |
| Pending Rejudge | The administrators decided to judge your program submission again, so your program is placed in the queue waiting for the judge. |
| Compiling | The judge is starting up and compiling your program source code. |
| Running | The judge is running your program, expect to have a result soon. |
| Accepted | Bingo! Your program is correct and passed all test cases! |
| Presentation Error | Your program is correct but the output format is not exactly the same as the one expected by the judge. |
| Wrong Answer | Your program does not generate the correct output for the test cases. Please revise your program and try again. |
| Time Limited Exceeded | Your program does not finish running before the time runs out. You may have to try a faster algorithm. |
| Memory Limit Exceeded | Your program use up too much memory, each problem have a specific memory limit and you must not use more than that. |
| Output Limited Exceeded | Your program generate too much output that must lead to a Wrong Answer if the judge continue, so the judge stops for performance reason. |
| Runtime Error | Any other errors during the running phase will result in this message. This includes "Segmentation fault", "Floating Point Exception", use of restricted functions, and any other reason that your program terminated in a sudden. |
| Compile Error | The judge cannot compile your program source code. Please make sure your program syntax is correct and can be compiled with the compilation commands given. |
Refer to our Judge System Environment, your C or C++ program is compiled with gcc on our system. Here's a few hints that why your VC++ program didn't work:
There is a minimum set of commands you can call in your bash script.
The contest ranking follows ACM contests's ranking algorithm:
Two people, Larry Wang ChaoJun and Wong Ho Wang did. By the time of writting, they are undergraduate students from the department of Computer Science and Engineering, the Chinese University of Hong Kong.
We built this website with the help of several open source softwares.
Online Programming Server was a school project named "Online High School Programming Server".
This fork is maintained by Wong Ho Wang, which is one of the original author.
Facebook