Translation note. This manual is a translation of the Portuguese original. The command-line tools (
moj,moj-contest,moj-comp) print their messages in Portuguese, and the command examples below are identical to the original.
This manual is now a page of MOJ itself:
📖
/treino/ajuda/On the site: use the "📖 How to submit" link, next to the language selector, when you submit the solution. It also works inside a contest: it is the only page outside
/contest/thatcontest-guardlets you open on the contest subdomain (there it uses the contest top bar and follows the contest LOCALE). The reason is that the competitor needs it on the isolated LAN.
The page teaches the same content that this file taught. The content now lives there:
solution.<ext>). With
a file, the file extension decides and MOJ ignores the menu. C++ accepts
.cpp, .cc, .cxx and
.c++. MOJ records the canonical language (cpp)
and keeps the name of your file.id (which is
the extension) and the note for each language.public class in Java,
.pl that is Prolog and not Perl, Python that is pypy3, and
the 128 MB stack..exe, .pdf,
.zip…) comes back with 400
lang_not_allowed and the list of what that problem
accepts. An empty language list means the platform
languages (PLATFORM_LANGS, the mirror of
mojtools/lang/), never "any extension". A source file
larger than 1 MB comes back with 413
source_too_large. These two checks came from the
incident of 2026-08-19. In that incident, a compiled binary entered the
queue and stayed pending forever..md fileweb/shared/languages.js). A new language shows in the help
automatically, thus the page does not get old. A table
written by hand here would get old at the first change..md file
in /docs/, the browser downloaded a text file.The content is web/treino/ajuda/ (the page) and
web/treino/ajuda/exemplos.js (the complete solutions). To
add a language to the table, change
web/shared/languages.js. To add an example solution,
run the code first and then add it to
exemplos.js.
lang/<lang>/ contract):
mojtools/README.md.