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.
Prefer the terminal? The
moj-compCLI also works in the training. You can search for a problem, download the statement, submit, and get the verdict without leaving the shell. Guide: /treino/cli.html.
Welcome to the MOJ Free Training. MOJ is an online judge. This manual shows, step by step, how to create your account, log in, find problems, submit your solution, and follow the result. It is for beginners, so it goes slowly and one step at a time.
Free Training is the place where you practice at your own pace. You
choose the problem, write the code, submit it, and see the verdict.
There is no deadline and no contest scoreboard. To compete for real, see
MANUAL-CONTEST.md at the end of this document.
Open the MOJ address /. You do not need to log
in to see the home page.
At the top is the menu bar, with these items:
| Item | What it is for |
|---|---|
| Home | Goes back to this page |
| Free Training | The free practice area (the subject of this manual) |
| Contests | Contests and trainings with a deadline |
| News | Announcements and news about the platform |
| Status | Status of the judges and of the system |
| Docs | Manuals and documentation |
Next to the menu is the language selector PT Β· EN Β· ES. The full site is available in the three languages. On the right is the login area. Before you log in, it shows the user and password fields. After you log in, it shows your avatar. The avatar opens a menu with shortcuts (My statistics, Profile, Log outβ¦).
Lower on the page, you find:
To start to practice, click Free Training. It takes
you to the address /treino/ (section 5).
The Free Training sign-up is at /treino/cadastro/, and
Telegram confirms it. This prevents duplicate accounts.
Thus, to sign up, you need a Telegram account.
Do these steps:
.,
_ and -. If you leave it empty, the system
uses your Telegram @ as the login.An important point about the password:
Your password comes only in a private message on Telegram. It never shows on the web. Keep this message in a safe place.
When the sign-up is complete, go to the login screen (next section).
Under 18 (no Telegram)? A responsible teacher/admin creates the account and gives you the login and the password. These accounts always have a private profile until the age of 18. Details are in
CONTAS-GERIDAS.md.
The login is at the top of every Free Training page. You see:
Type the user and the password (the password is the one that the bot sent on Telegram). Then click Log in.
When you are logged in, the right corner of the bar shows your avatar. Click it to open a menu with shortcuts:
There is no "forgot password" form on the web. You recover the password through Telegram.
If you linked Telegram to your account (this occurs at sign-up), do these steps:
/trocarsenha.Then go back to the login screen and log in with the new password.
If your account has no Telegram (an account that a responsible person created; see the note in section 2), the responsible person who created the account resets the password.
The problem search is at /treino/. You do not
need to log in to see the list and read the statements. You
must log in to see your personal progress and to
submit a solution.
The page has two modes: the hub (the entry page) and the advanced search (the full list with filters). Any search or filter takes you from the hub to the advanced search automatically.
The full list is always visible, with the filter rail on the left:
obi) to get all its
collections at once. The number on the right is your
progress (for example, 20/140).Above the table are the chips of the active filters (the Γ removes them one at a time), the result count, and the sort order: Most solved, AβZ, Difficulty and Newest (the most recently published first).
| Column | What it shows |
|---|---|
| β | If you solved (β) or attempted (β¦). It shows when you are logged in |
| Problem | The title. It is the link that opens the problem |
| Collections | Click a collection to add it to the filter |
| Difficulty | The range from the per-user rate (solved Γ· attempted) |
| Dirt | How much users fail before they succeed: the part of the submissions of the solvers that was wrong. High = the problem punishes errors. Green β€20%, yellow β€50%, red above. |
| Solved | How many users solved / attempted |
The list comes in pages of 50. Tip: the URL keeps your filters. Copy the link to share a search. On a phone, the rail becomes the Filters (n) button.
To open a problem, click its title.
When you click the title, you go to the address
/treino/problema/?id=<id>. <id> is
the code of the problem. The screen has two parts:
At the top of the statement you find:
Each sample block in the statement has a Copy button in its title. One click copies the full block, with the final line break.
When the problem has the statement in more than one language, the chips PT Β· EN Β· ES show above the text. Click a chip to change the language. The title changes too. MOJ remembers your selection for the next problems. In the problem list, the EN ES badge next to the title shows which problems have a translation.
You must be logged in to submit. In the Submit solution panel:
What you see after the click. There is no pop-up window. The button shows a spinner with Sendingβ¦ while the submission goes to the server, and it does not accept another click. Then it becomes green for a moment, with β Sent. Below it, the confirmation β Submitted at 14:03:12 β C++ shows, and the submission appears in the history immediately. After the submission, the file field is empty.
MOJ does not send an empty editor or the language template without changes: it asks you to write your solution.
Same code again. If the code is equal to the last code that you submitted for that problem, in the same language, the first click does not submit. The button becomes orange and shows Same code as the 14:03 submission β submit again?. Click again within 5 seconds to submit it anyway. A different language counts as new code.
At most 3 submissions in the queue. Your account can have up to 3 submissions waiting for a verdict at the same time. The 4th one is refused with the message "You already have 3 submissions waiting for a verdict". Wait for a result and submit again. The limit also applies to virtual participation. It makes sure that no account takes the judge for itself.
The editor has some conveniences:
Below is the Submission history, with these columns:
| Column | What it shows |
|---|---|
| Date/Time | When you submitted |
| Actions | Quick buttons (see below) |
| Language | The language of that submission |
| Status | The verdict of the judgment |
The buttons in the Actions column are:
While the result is pending, a loading indicator shows, and the page updates automatically when the verdict is ready. You do not need to reload the page manually.
Below the verdict is a summary line, for example:
Passed 3/5 tests
The details of each language and of how data input and output work
are on the site's Help page
(/treino/ajuda/). This page also has the starter code for
each language. The link "π How to submit" shows next to the language
selector when you submit.
Your profile is at /treino/perfil/. It has sections, and
each section has its own save button. Change what you
want and save one section at a time.
| Section | What you change |
|---|---|
| Details | Name, university and the favorite editor/IDE (it shows in the editor ranking) |
| Password | Current password, new password and confirmation of the new password |
| Privacy | The Public profile option. If you clear it, your statistics are only for you |
| Profile photo | Upload an image. The image is cropped to 100x100 |
| Username | Change your handle |
β Be careful when you change the Username:
A change of handle updates all your history to the new name. There is a limit of changes per year (the default is 2). The screen shows how many you already used.
This page is where you edit the profile. What other
users see, your public profile, is at
/treino/stat/?user=<your login>. The next section is
about it.
Each user has a public profile at
/treino/stat/?user=<login>. To open yours, use the
avatar menu β π My statistics. To open the profile of
another user, click the name (for example, in the Top 10 on the home
page).
From top to bottom, the profile shows:
82/100).
The full catalog and the rules are in PERFIL.md.Remember: if your profile is private (section 7), all of this shows only for you. Your name is also removed from the public lists on the home page.
The page /treino/editores/ collects the statistics of
the favorite editors that users declare: a
ranking and the distribution of who
uses what.
Tip: do you want to show in this ranking? Declare your editor in the Details section of the Profile (see section 7).
Some ended contests have the πΉοΈ Virtual button on their card (home page and contests archive). It opens the virtual participation. You do the full contest again, with a clock, against the official scoreboard. The official teams solve the problems at the same minute as in the real contest.
Scoreboard filters. The bar is the same as on the contest scoreboard: Board (for example, only the official teams, without guests), Flag, University, Site and the search. When a filter is active, the large number is the position in the filtered subset. The small number is the overall position. Your row always shows. My picks. Click the π on a virtual row to pin that person. That person then always shows on the scoreboard, with any filter. The π Picks button opens the list. In the list, you can search by name or login, select and clear entries, or add the login of a user who did not do the virtual participation of this contest yet. The list belongs to your account and applies to all contests. Example: pick your friends, select a Site, and see the position of each friend among the teams of that site.
The Virtuals selector selects one of these: all the virtual participants, only the picks, only you, or none. The Site filter does not hide the virtual participants. Thus you can compare your result with the teams of that site.
Give up without a record: the Give up button is available in the first 15 minutes, or while you have no accepted problem. When you give up, you get the attempt back, 2 times at most. After that, the start is final. If the time ends with no accepted problem, it counts as giving up.
After: your row stays on the virtual scoreboard of the contest, marked as virtual. Each account does the virtual participation of a contest one time. The submissions stay in your training history.
When you are not logged in, the same page shows the Replay. Drag the time control to see the scoreboard at any minute of the contest.
/treino/ajuda/).MANUAL-CONTEST.md.Good training, and good code.