News
About Status Codes
posted on Dec. 11, 2023, 11:01 p.m. 0AC - Accepted
Your program passed testing! In some cases, this may be accompanied with additional feedback from the grader.
WA - Wrong Answer
Your program did not crash while executing, but the output it produced was wrong. As for AC, this may be accompanied with additional feedback stating what you did wrong.
IR - Invalid Return
Your program returned with a nonzero exit code (if you're not using a native language like C++, it crashed). For languages like Python or Java, this will typically be accompanied with the name of the exception your program threw, e.g., NameError
or java.lang.NullPointerException
, respectively.
OLE - Output Limit Exceeded
Your program outputted too much data to stdout
, typically over 256mb (though some problems may have custom — generally larger — constraints).
MLE - Memory Limit Exceeded
Your program ran out of memory. Sometimes, this might manifest itself as an RTE with segmentation fault
or std::bad_alloc
.
TLE - Time Limit Exceeded
Your program took too long to execute.
IE - Internal Error
If you see this, it means either the judge encountered an error or the problemsetter's configuration is incorrect. Administrators get notified of every internal error by email, and as such there is no need to do anything else — IEs will typically be resolved within 24 hours.
RTE - Runtime Error
Your program caused a runtime error to occur. This will only occur for native languages like C or C++. DMOJ maps many common RTEs to more useful descriptions, described below.
Feedback | Description |
---|---|
segmentation fault , bus error |
Your program was killed by SIGSEGV or SIGBUS. Generally, this means you ran out of memory, but among other things it can also mean that you are accessing arrays out of bounds. |
floating point exception |
Your program performed a bad arithmetic operation, such as division by zero. |
killed |
Your program was killed by the runtime for some reason (which we don't know). |
opening files is not allowed |
Unless a problem specifically says you can, you may not open files — doing so will get you this message. |
{} syscall disallowed |
Unless you are doing something of a dubious nature, you should never see this message. If you do, please file a ticket so we can get it sorted out. |
std::bad_alloc |
new failed to allocate enough memory. All C++ exceptions are mapped to feedback like this, though this is the most common exception you're likely to encounter. |
failed initializing |
Your program uses too much data defined in global scope for it to fit inside the memory constraints at startup. A typical example is code like
|
Sample
posted on June 5, 2023, 4:12 p.m. 0Python 2
N = int(raw_input())
for _ in xrange(N):
a, b = map(int, raw_input().split())
print a + b
Python 3
N = int(input())
for _ in range(N):
a, b = map(int, input().split())
print(a + b)
Java
import java.util.*;
public class APlusB {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
for (int i = 0; i < N; i++) {
int a = in.nextInt();
int b = in.nextInt();
System.out.println(a + b);
}
}
}
C++
#include <iostream>
using namespace std;
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) {
int a, b;
cin >> a >> b;
cout << a + b << endl;
}
}
C
#include <stdio.h>
int main() {
int N;
scanf("%d\n", &N);
for (int i = 0; i < N; i++) {
int a, b;
scanf("%d %d\n", &a, &b);
printf("%d\n", a + b);
}
}
JS
print(...): similar to Python's print, prints all argument separated by space followed by new line.
flush(): flushes stdout, ensuring everything output by print() immediately shows up.
gets(): similar to the Ruby equivalent, returns one line of input from stdin.
read(bytes): read bytes bytes from stdin as an ArrayBuffer.
write(buffer): write a typed array, ArrayBuffer, or a view of ArrayBuffer to stdout.
quit(code): exits the program with code.
You can also assign to the global variable autoflush to control whether print() flushes.
First Post
posted on Dec. 2, 2017, 5:00 a.m. 1Welcome to the NCCSOFT CONTEST!
print('Hello, World!')
You can get started by checking out this problem we've added for you.