%% Generated by Sphinx.
\def\sphinxdocclass{report}
\documentclass[a4paper,10pt,english,openany]{sphinxmanual}
\ifdefined\pdfpxdimen
   \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
\fi \sphinxpxdimen=.75bp\relax
\ifdefined\pdfimageresolution
    \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relax
\fi
%% let collapsible pdf bookmarks panel have high depth per default
\PassOptionsToPackage{bookmarksdepth=5}{hyperref}

\PassOptionsToPackage{booktabs}{sphinx}
\PassOptionsToPackage{colorrows}{sphinx}

\PassOptionsToPackage{warn}{textcomp}
\usepackage[utf8]{inputenc}
\ifdefined\DeclareUnicodeCharacter
% support both utf8 and utf8x syntaxes
  \ifdefined\DeclareUnicodeCharacterAsOptional
    \def\sphinxDUC#1{\DeclareUnicodeCharacter{"#1}}
  \else
    \let\sphinxDUC\DeclareUnicodeCharacter
  \fi
  \sphinxDUC{00A0}{\nobreakspace}
  \sphinxDUC{2500}{\sphinxunichar{2500}}
  \sphinxDUC{2502}{\sphinxunichar{2502}}
  \sphinxDUC{2514}{\sphinxunichar{2514}}
  \sphinxDUC{251C}{\sphinxunichar{251C}}
  \sphinxDUC{2572}{\textbackslash}
\fi
\usepackage{cmap}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amstext}
\usepackage{babel}



\usepackage{tgtermes}
\usepackage{tgheros}
\renewcommand{\ttdefault}{txtt}



\usepackage[Bjarne]{fncychap}
\usepackage{sphinx}

\fvset{fontsize=auto}
\usepackage{geometry}


% Include hyperref last.
\usepackage{hyperref}
% Fix anchor placement for figures with captions.
\usepackage{hypcap}% it must be loaded after hyperref.
% Set up styles of URL: it should be placed after hyperref.
\urlstyle{same}


\usepackage{sphinxmessages}



\definecolor{VerbatimColor}{rgb}{0.95,0.95,0.95}
\definecolor{OuterLinkColor}{rgb}{0,0,1}
\definecolor{noteBgColor}{rgb}{1,0,1}

\definecolor{sphinxnoteBgColor}{RGB}{221,233,239}

\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\familydefault}{\sfdefault}

% Begin new paragraphs without indentation but vertical space.
\setlength{\parindent}{0pt}
\setlength{\parskip}{1.5ex plus 0.5ex minus 0.2ex}
\usepackage{titlesec}

% No chapter numbers.
\renewcommand{\thesection}{\arabic{section}}



\title{DOMjudge Team Manual}
\date{2024}
\release{8.3.1}
\author{DOMjudge Team}
\newcommand{\sphinxlogo}{\vbox{}}
\renewcommand{\releasename}{Release}
\makeindex
\begin{document}

\ifdefined\shorthandoff
  \ifnum\catcode`\=\string=\active\shorthandoff{=}\fi
  \ifnum\catcode`\"=\active\shorthandoff{"}\fi
\fi

\pagestyle{empty}

\pagestyle{plain}

\pagestyle{normal}
\phantomsection\label{\detokenize{team::doc}}


\noindent{\hspace*{\fill}\sphinxincludegraphics[width=60bp,height=132bp]{{DOMjudgelogo}.png}}

\sphinxAtStartPar
This is the manual for the DOMjudge programming contest control system
version 8.3.
The summary below outlines the working of the system interface. It
is meant as a quick introduction, to be able to start using the system.
It is however strongly advised that your team reads the entire document.
There are specific details of this contest control system that might
become of importance when you run into problems.

\begin{sphinxadmonition}{note}{Summary}

\sphinxAtStartPar
The web interface of DOMjudge can be found at
\sphinxurl{https://example.com/domjudge/team}. See the two figures on the next page for
an impression.

\sphinxAtStartPar
Solutions have to read all input from ‘standard in’ and write all
output to ‘standard out’ (also known as console). You will never have
to open (other) files. Also see our {\hyperref[\detokenize{team:codeexamples}]{\sphinxcrossref{\DUrole{std,std-ref}{code examples}}}}.

\sphinxAtStartPar
You can submit solutions in two ways:
\begin{quote}
\begin{description}
\sphinxlineitem{Command\sphinxhyphen{}line}
\sphinxAtStartPar
Use \sphinxcode{\sphinxupquote{submit \textless{}filename\textgreater{}}}. If your filename is of the form
\sphinxcode{\sphinxupquote{\textless{}problem\textgreater{}.\textless{}extension\textgreater{}}} where \sphinxcode{\sphinxupquote{\textless{}problem\textgreater{}}} is the
label of the problem and \sphinxcode{\sphinxupquote{\textless{}extension\textgreater{}}} is a standard extension for
your language, then these will automatically be detected.
It will also try to auto\sphinxhyphen{}detect the main class (for Java and Kotlin) or the
main file (for Python). You can override these auto\sphinxhyphen{}detections;
for a complete reference of all options and examples, see \sphinxcode{\sphinxupquote{submit \sphinxhyphen{}\sphinxhyphen{}help}}.

\sphinxlineitem{Web interface}
\sphinxAtStartPar
From your team page, \sphinxurl{https://example.com/domjudge/team}, click the green \sphinxstylestrong{Submit}
button in the menu bar. Select the files you want to submit.
By default, the problem is selected from the base of the (first)
filename and the language from the extension. The web interface tries
to auto\sphinxhyphen{}detect the main class (for Java and Kotlin) or the main file (for
Python) from the file name. Double check that the guess is correct
before submitting.

\end{description}
\end{quote}

\sphinxAtStartPar
Viewing scores, submissions and sending and reading clarification
requests and replies is done through the web interface at
\sphinxurl{https://example.com/domjudge/team}.
\end{sphinxadmonition}



\clearpage


\section{Overview of the interface}
\label{\detokenize{team:overview-of-the-interface}}
\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=0.800\linewidth]{{team-overview}.png}
\caption{The team web interface overview page.}\label{\detokenize{team:id3}}\end{figure}

\begin{figure}[htbp]
\centering
\capstart

\noindent\sphinxincludegraphics[width=0.800\linewidth]{{team-scoreboard}.png}
\caption{The scoreboard webpage.}\label{\detokenize{team:id4}}\end{figure}




\section{Submitting solutions}
\label{\detokenize{team:submitting-solutions}}\label{\detokenize{team:submitting}}
\sphinxAtStartPar
Submitting solutions can be done in two ways: with the command\sphinxhyphen{}line
program \sphinxcode{\sphinxupquote{submit}} (if installed) or using the web interface.


\subsection{Command\sphinxhyphen{}line: \sphinxstyleliteralintitle{\sphinxupquote{submit}}}
\label{\detokenize{team:command-line-submit}}
\sphinxAtStartPar
Syntax:

\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{n}{submit} \PYG{p}{[}\PYG{n}{options}\PYG{p}{]} \PYG{n}{filename}\PYG{o}{.}\PYG{n}{ext} \PYG{o}{.}\PYG{o}{.}\PYG{o}{.}
\end{sphinxVerbatim}

\sphinxAtStartPar
The submit program takes the name (label) of the problem from
\sphinxcode{\sphinxupquote{filename}} and the programming language from the extension
\sphinxcode{\sphinxupquote{ext}}.

\sphinxAtStartPar
For Java it uses the filename as a guess for the
main class; for Kotlin it capitalizes filename and appends
\sphinxcode{\sphinxupquote{Kt}} to compute the guess for the main class name. For Python,
the first filename is used as a guess for the main file.
These guesses can be overruled with the options
\sphinxcode{\sphinxupquote{\sphinxhyphen{}p problemname}}, \sphinxcode{\sphinxupquote{\sphinxhyphen{}l languageextension}} and
\sphinxcode{\sphinxupquote{\sphinxhyphen{}e entry\_point}}.

\sphinxAtStartPar
See \sphinxcode{\sphinxupquote{submit \sphinxhyphen{}\sphinxhyphen{}help}} for a complete list of all options,
extensions and some examples.

\sphinxAtStartPar
\sphinxcode{\sphinxupquote{submit}} will check your file and warns you for some problems:
for example when the file has not been modified for a long time or
when it’s larger than the maximum source code size
(see {\hyperref[\detokenize{team:runlimits}]{\sphinxcrossref{\DUrole{std,std-ref}{the section on restrictions}}}}).

\sphinxAtStartPar
Filenames must start with an alphanumerical character and may contain only
alphanumerical characters and \sphinxcode{\sphinxupquote{+.\textbackslash{}\_\sphinxhyphen{}}}. You can specify multiple files
to be part of this submission (see section
“{\hyperref[\detokenize{team:judgingprocess}]{\sphinxcrossref{\DUrole{std,std-ref}{How are submissions being judged?}}}}”).

\sphinxAtStartPar
Then \sphinxcode{\sphinxupquote{submit}} displays a summary with all details of your
submission and asks for confirmation. Check whether you are submitting
the right file for the right problem and language and press \sphinxcode{\sphinxupquote{y}} to
confirm. \sphinxcode{\sphinxupquote{submit}} will report a successful submission or give
an error message otherwise.


\subsection{Web interface}
\label{\detokenize{team:web-interface}}
\sphinxAtStartPar
Solutions can be submitted from the web interface at \sphinxurl{https://example.com/domjudge/team}.
Click the green \sphinxstyleemphasis{Submit} button at the menu bar on every page.
Click the file selection button and select one or
multiple files for submission. DOMjudge will try to determine the
problem, language and main class (in case of Java and Kotlin) or main file
(in case of Python) from the base and extension of the first filename.
Otherwise, select the appropriate values.
Filenames must start with an alphanumerical character and may contain only
alphanumerical characters and \sphinxcode{\sphinxupquote{+.\textbackslash{}\_\sphinxhyphen{}}}.

\sphinxAtStartPar
After you hit the submit button and confirm the submission, you will
be redirected back to your submission list page. On this page, a message
will be displayed that your submission was successful and the
submission will be present in the list. An error message will be
displayed if something went wrong.


\section{Viewing the results of submissions}
\label{\detokenize{team:viewing-the-results-of-submissions}}
\sphinxAtStartPar
The left column of your team web page shows an overview of your submissions.
It contains all relevant information: submission time, programming
language, problem and status. The address of your team page is
\sphinxurl{https://example.com/domjudge/team}.

\sphinxAtStartPar
The top of the page shows your team’s row in the scoreboard: your position and
which problems you attempted and solved. Via the menu you can view the public
scoreboard page with the scores of all teams. Many cells will show
additional “title text” information when hovering over them. The
score column lists the number of solved problems and the total time including
penalty time. Each cell in a problem column lists the number of submissions,
and if the problem was solved, the time of the first correct
submission in minutes since contest start. This is included in your
total time together with any penalty time incurred for previous
incorrect submissions.

\sphinxAtStartPar
Optionally the scoreboard can be ‘frozen’ some time before the end of the
contest. The full scoreboard view will not be updated anymore, but your
team row on your overview page will be. Your team’s rank will then be
displayed as ‘?’.

\sphinxAtStartPar
Finally, via the top menu you can also view the list of problems and
view/download problem texts and sample data, if provided by the judges.


\subsection{Possible results}
\label{\detokenize{team:possible-results}}
\sphinxAtStartPar
A submission can have the following results (not all of these may be
available depending on configuration of the system):
\begin{description}
\sphinxlineitem{CORRECT}
\sphinxAtStartPar
The submission passed all tests: you solved this problem!
\sphinxstyleemphasis{Correct submissions do not incur penalty time.}

\sphinxlineitem{COMPILER\sphinxhyphen{}ERROR}
\sphinxAtStartPar
There was an error when compiling your program. On the submission
details page you can inspect the exact error (this option might be
disabled).
Note that when compilation takes more than 30 seconds,
it is aborted and this counts as a compilation error.
\sphinxstyleemphasis{Compilation errors do not incur penalty time. The administrator of
the contest can change this scoring.}

\sphinxlineitem{TIMELIMIT}
\sphinxAtStartPar
Your program took longer than the maximum allowed time for this
problem. Therefore it has been aborted. This might indicate that your
program hangs in a loop or that your solution is not efficient
enough.

\sphinxlineitem{RUN\sphinxhyphen{}ERROR}
\sphinxAtStartPar
There was an error during the execution of your program. This can have
a lot of different causes like division by zero, incorrectly
addressing memory (e.g. by indexing arrays out of bounds), trying to
use more memory than the limit, reading or writing to files, etc.
Also check that your program exits with exit code 0!

\sphinxlineitem{NO\sphinxhyphen{}OUTPUT}
\sphinxAtStartPar
Your program did not generate any output. Check that you write to
standard out.

\sphinxlineitem{OUTPUT\sphinxhyphen{}LIMIT}
\sphinxAtStartPar
Your program generated more output than the allowed limit. The solution
is considered incorrect.

\sphinxlineitem{WRONG\sphinxhyphen{}ANSWER}
\sphinxAtStartPar
The output of your program was incorrect. This can happen simply
because your solution is not correct, but remember that your output
must comply exactly with the specifications of the judges. See
{\hyperref[\detokenize{team:testing}]{\sphinxcrossref{\DUrole{std,std-ref}{testing}}}} below for more details.

\sphinxlineitem{TOO\sphinxhyphen{}LATE}
\sphinxAtStartPar
Bummer, you submitted after the contest ended! Your submission is
stored but will not be processed anymore.

\end{description}

\sphinxAtStartPar
The judges may have prepared multiple test files for each problem.
DOMjudge will report back the first highest priority non\sphinxhyphen{}correct result as verdict.
\sphinxstyleemphasis{Your administrator can decide on different priorities for non\sphinxhyphen{}correct results.}


\section{Clarifications}
\label{\detokenize{team:clarifications}}
\sphinxAtStartPar
All communication with the judges is to be done through clarification
messages.
These can be found in the right column on your team page. Both
clarification replies from the judges and requests sent by you
are displayed there.

\sphinxAtStartPar
There is also a button to submit a new clarification request to the
judges; you can associate a specific problem or one of the general
categories to a request. This clarification request is only readable
for the judges. The judges can answer specifically to your team or send a
reply to everyone if it is relevant for all.


\section{How are submissions being judged?}
\label{\detokenize{team:how-are-submissions-being-judged}}\label{\detokenize{team:judgingprocess}}
\sphinxAtStartPar
The DOMjudge contest control system is fully automated.
Judging is done in the following way:


\subsection{Submitting solutions}
\label{\detokenize{team:id1}}
\sphinxAtStartPar
With the \sphinxcode{\sphinxupquote{submit}} program or the web interface (see
{\hyperref[\detokenize{team:submitting}]{\sphinxcrossref{\DUrole{std,std-ref}{the section on submitting}}}}) you
can submit a solution to a problem to the judges. Note that you have to submit
the source code of your program (and not a compiled program or the output of
your program).

\sphinxAtStartPar
On the contest control system your program enters a queue, awaiting compilation,
execution and testing on one of the autojudges.


\subsection{Compilation}
\label{\detokenize{team:compilation}}
\sphinxAtStartPar
Your program will be compiled on an autojudge machine running Linux.
All submitted source files will be passed to the compiler which
generates a single program to run. For Java and Kotlin the given
main class will be checked; for Python we do a
syntax check using the \sphinxcode{\sphinxupquote{py\_compile}} module.


\subsection{Testing}
\label{\detokenize{team:testing}}\label{\detokenize{team:id2}}
\sphinxAtStartPar
After your program has compiled successfully it will be executed and
its output compared to the output of the judges. Before comparing the
output, the exit status of your program is checked: if your program
exits with a non\sphinxhyphen{}zero exit code, the result will be a run\sphinxhyphen{}error
even if the output of the program is correct!
There are some restrictions during execution. If your program violates
these it will also be aborted with a run\sphinxhyphen{}error,
see {\hyperref[\detokenize{team:runlimits}]{\sphinxcrossref{\DUrole{std,std-ref}{the section on restrictions}}}}.

\sphinxAtStartPar
When comparing program output, it has to exactly match to output of
the judges, except that some extra whitespace may be ignored (this
depends on the system configuration of the problems). So take care
that you follow the output specifications. In case of problem
statements which do not have unique output (e.g. with floating point
answers), the system may use a modified comparison function.
This will be documented in the problem description.


\subsection{Restrictions}
\label{\detokenize{team:restrictions}}\label{\detokenize{team:runlimits}}
\sphinxAtStartPar
Submissions are run in a sandbox to prevent abuse, keep the jury system
stable and give everyone clear and equal environments. There
are some restrictions to which all submissions are subjected:
\begin{description}
\sphinxlineitem{compile time}
\sphinxAtStartPar
Compilation of your program may take no longer than 30
seconds. After that, compilation will be aborted and the result will
be a compile error. In practice this should never give rise to
problems. Should this happen to a normal program, please inform the
judges right away.

\sphinxlineitem{source size}
\sphinxAtStartPar
The total amount of source code in a single submission may not exceed
256 kilobytes, otherwise your submission will be rejected.

\sphinxlineitem{memory}
\sphinxAtStartPar
The judges will specify how much memory you have available during
execution of your program. This may vary per problem. It is the
total amount of memory (including program code, statically and
dynamically defined variables, stack, Java/Python VM, …)!
If your program tries to use more memory, it will most likely abort,
resulting in a run error.

\sphinxlineitem{creating new files}
\sphinxAtStartPar
Do not create new files. The sandbox will not allow this and the file open
function will return a failure. Using the file without handling this error can
result in a runtime error depending on the submission language.

\sphinxlineitem{number of processes}
\sphinxAtStartPar
You are not supposed to explicitly create multiple processes (threads). This is
to no avail anyway, because your program has exactly 1 processor core fully
at its disposal. DOMjudge executes submissions in a sandbox where a maximum
of 64 processes can be run simultaneously (including processes that
started your program).

\sphinxAtStartPar
People who have never programmed with multiple processes (or have
never heard of “threads”) do not have to worry: a normal program
runs in one process.

\end{description}




\section{Code examples}
\label{\detokenize{team:code-examples}}\label{\detokenize{team:codeexamples}}
\sphinxAtStartPar
Below are a few examples on how to read input and write output for a
problem.

\sphinxAtStartPar
The examples are solutions for the following problem: the first line
of the input contains the number of testcases. Then each testcase
consists of a line containing a name (a single word) of at most 99
characters. For each testcase output the string \sphinxcode{\sphinxupquote{Hello \textless{}name\textgreater{}!}}
on a separate line.

\sphinxAtStartPar
Sample input and output for this problem:


\begin{savenotes}\sphinxattablestart
\sphinxthistablewithglobalstyle
\centering
\begin{tabular}[t]{*{2}{\X{1}{2}}}
\sphinxtoprule
\sphinxstyletheadfamily 
\sphinxAtStartPar
Input
&\sphinxstyletheadfamily 
\sphinxAtStartPar
Output
\\
\sphinxmidrule
\sphinxtableatstartofbodyhook
\begin{DUlineblock}{0em}
\item[] \sphinxcode{\sphinxupquote{3}}
\item[] \sphinxcode{\sphinxupquote{world}}
\item[] \sphinxcode{\sphinxupquote{Jan}}
\item[] \sphinxcode{\sphinxupquote{SantaClaus}}
\end{DUlineblock}
&
\begin{DUlineblock}{0em}
\item[] \sphinxcode{\sphinxupquote{Hello world!}}
\item[] \sphinxcode{\sphinxupquote{Hello Jan!}}
\item[] \sphinxcode{\sphinxupquote{Hello SantaClaus!}}
\end{DUlineblock}
\\
\sphinxbottomrule
\end{tabular}
\sphinxtableafterendhook\par
\sphinxattableend\end{savenotes}

\sphinxAtStartPar
Note that the number \sphinxcode{\sphinxupquote{3}} on the first line indicates that 3 testcases
follow.

\sphinxAtStartPar
What follows is a number of possible solutions to this problem
for different programming languages.
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in C}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id5}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+cp}{\PYGZsh{}}\PYG{c+cp}{include}\PYG{+w}{ }\PYG{c+cpf}{\PYGZlt{}stdio.h\PYGZgt{}}

\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n+nf}{main}\PYG{p}{(}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{	}\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n}{i}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{ntests}\PYG{p}{;}
\PYG{+w}{	}\PYG{k+kt}{char}\PYG{+w}{ }\PYG{n}{name}\PYG{p}{[}\PYG{l+m+mi}{100}\PYG{p}{]}\PYG{p}{;}

\PYG{+w}{	}\PYG{n}{scanf}\PYG{p}{(}\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{\PYGZpc{}d}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s}{\PYGZdq{}}\PYG{p}{,}\PYG{+w}{ }\PYG{o}{\PYGZam{}}\PYG{n}{ntests}\PYG{p}{)}\PYG{p}{;}

\PYG{+w}{	}\PYG{k}{for}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{i}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{l+m+mi}{0}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{n}{ntests}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{o}{+}\PYG{o}{+}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{		}\PYG{n}{scanf}\PYG{p}{(}\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{\PYGZpc{}s}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s}{\PYGZdq{}}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{name}\PYG{p}{)}\PYG{p}{;}
\PYG{+w}{		}\PYG{n}{printf}\PYG{p}{(}\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{Hello \PYGZpc{}s!}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s}{\PYGZdq{}}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{name}\PYG{p}{)}\PYG{p}{;}
\PYG{+w}{	}\PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}

\clearpage
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in C++}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id6}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+cp}{\PYGZsh{}}\PYG{c+cp}{include}\PYG{+w}{ }\PYG{c+cpf}{\PYGZlt{}iostream\PYGZgt{}}
\PYG{c+cp}{\PYGZsh{}}\PYG{c+cp}{include}\PYG{+w}{ }\PYG{c+cpf}{\PYGZlt{}string\PYGZgt{}}

\PYG{k}{using}\PYG{+w}{ }\PYG{k}{namespace}\PYG{+w}{ }\PYG{n+nn}{std}\PYG{p}{;}

\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n+nf}{main}\PYG{p}{(}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{	}\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n}{ntests}\PYG{p}{;}
\PYG{+w}{	}\PYG{n}{string}\PYG{+w}{ }\PYG{n}{name}\PYG{p}{;}

\PYG{+w}{	}\PYG{n}{cin}\PYG{+w}{ }\PYG{o}{\PYGZgt{}}\PYG{o}{\PYGZgt{}}\PYG{+w}{ }\PYG{n}{ntests}\PYG{p}{;}
\PYG{+w}{	}\PYG{k}{for}\PYG{+w}{ }\PYG{p}{(}\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n}{i}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{l+m+mi}{0}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{n}{ntests}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{o}{+}\PYG{o}{+}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{		}\PYG{n}{cin}\PYG{+w}{ }\PYG{o}{\PYGZgt{}}\PYG{o}{\PYGZgt{}}\PYG{+w}{ }\PYG{n}{name}\PYG{p}{;}
\PYG{+w}{		}\PYG{n}{cout}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{Hello }\PYG{l+s}{\PYGZdq{}}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{n}{name}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{!}\PYG{l+s}{\PYGZdq{}}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{n}{endl}\PYG{p}{;}
\PYG{+w}{	}\PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in Java}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id7}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{// Note: do not use any \PYGZsq{}package\PYGZsq{} statements}

\PYG{k+kn}{import}\PYG{+w}{ }\PYG{n+nn}{java.util.*}\PYG{p}{;}

\PYG{k+kd}{class} \PYG{n+nc}{Main}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{	}\PYG{k+kd}{public}\PYG{+w}{ }\PYG{k+kd}{static}\PYG{+w}{ }\PYG{k+kt}{void}\PYG{+w}{ }\PYG{n+nf}{main}\PYG{p}{(}\PYG{n}{String}\PYG{o}{[}\PYG{o}{]}\PYG{+w}{ }\PYG{n}{args}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{		}\PYG{n}{Scanner}\PYG{+w}{ }\PYG{n}{scanner}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{k}{new}\PYG{+w}{ }\PYG{n}{Scanner}\PYG{p}{(}\PYG{n}{System}\PYG{p}{.}\PYG{n+na}{in}\PYG{p}{)}\PYG{p}{;}
\PYG{+w}{		}\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n}{nTests}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{n}{scanner}\PYG{p}{.}\PYG{n+na}{nextInt}\PYG{p}{(}\PYG{p}{)}\PYG{p}{;}

\PYG{+w}{		}\PYG{k}{for}\PYG{+w}{ }\PYG{p}{(}\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n}{i}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{l+m+mi}{0}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{n}{nTests}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{o}{+}\PYG{o}{+}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{			}\PYG{n}{String}\PYG{+w}{ }\PYG{n}{name}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{n}{scanner}\PYG{p}{.}\PYG{n+na}{next}\PYG{p}{(}\PYG{p}{)}\PYG{p}{;}
\PYG{+w}{			}\PYG{n}{System}\PYG{p}{.}\PYG{n+na}{out}\PYG{p}{.}\PYG{n+na}{println}\PYG{p}{(}\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{Hello }\PYG{l+s}{\PYGZdq{}}\PYG{+w}{ }\PYG{o}{+}\PYG{+w}{ }\PYG{n}{name}\PYG{+w}{ }\PYG{o}{+}\PYG{+w}{ }\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{!}\PYG{l+s}{\PYGZdq{}}\PYG{p}{)}\PYG{p}{;}
\PYG{+w}{		}\PYG{p}{\PYGZcb{}}
\PYG{+w}{	}\PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in Kotlin}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id8}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{c+c1}{// Note: do not use any \PYGZsq{}package\PYGZsq{} statements}

\PYG{k}{import}\PYG{+w}{ }\PYG{n+nn}{java.util.*}

\PYG{k+kd}{fun}\PYG{+w}{ }\PYG{n+nf}{main}\PYG{p}{(}\PYG{n}{args}\PYG{p}{:}\PYG{+w}{ }\PYG{n}{Array}\PYG{o}{\PYGZlt{}}\PYG{k+kt}{String}\PYG{o}{\PYGZgt{}}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{    }\PYG{k+kd}{var}\PYG{+w}{ }\PYG{n+nv}{scanner}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{n}{Scanner}\PYG{p}{(}\PYG{n}{System}\PYG{p}{.}\PYG{n}{`in`}\PYG{p}{)}
\PYG{+w}{    }\PYG{k+kd}{val}\PYG{+w}{ }\PYG{n+nv}{nTests}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{n}{scanner}\PYG{p}{.}\PYG{n+na}{nextInt}\PYG{p}{(}\PYG{p}{)}
\PYG{+w}{    }\PYG{k}{for}\PYG{+w}{ }\PYG{p}{(}\PYG{n}{i}\PYG{+w}{ }\PYG{k}{in}\PYG{+w}{ }\PYG{l+m}{1.}\PYG{p}{.}\PYG{n+na}{nTests}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{	    }\PYG{n}{System}\PYG{p}{.}\PYG{n}{`out`}\PYG{p}{.}\PYG{n+na}{format}\PYG{p}{(}\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{Hello \PYGZpc{}s!\PYGZpc{}n}\PYG{l+s}{\PYGZdq{}}\PYG{p}{,}\PYG{+w}{ }\PYG{n}{scanner}\PYG{p}{.}\PYG{n+na}{next}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)}
\PYG{+w}{    }\PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in Python}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id9}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kn}{import} \PYG{n+nn}{sys}

\PYG{n}{n} \PYG{o}{=} \PYG{n+nb}{int}\PYG{p}{(}\PYG{n+nb}{input}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)}
\PYG{k}{for} \PYG{n}{i} \PYG{o+ow}{in} \PYG{n+nb}{range}\PYG{p}{(}\PYG{n}{n}\PYG{p}{)}\PYG{p}{:}
    \PYG{n}{name} \PYG{o}{=} \PYG{n}{sys}\PYG{o}{.}\PYG{n}{stdin}\PYG{o}{.}\PYG{n}{readline}\PYG{p}{(}\PYG{p}{)}\PYG{o}{.}\PYG{n}{rstrip}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+se}{\PYGZbs{}n}\PYG{l+s+s1}{\PYGZsq{}}\PYG{p}{)}
    \PYG{n+nb}{print}\PYG{p}{(}\PYG{l+s+s1}{\PYGZsq{}}\PYG{l+s+s1}{Hello }\PYG{l+s+si}{\PYGZpc{}s}\PYG{l+s+s1}{!}\PYG{l+s+s1}{\PYGZsq{}} \PYG{o}{\PYGZpc{}} \PYG{p}{(}\PYG{n}{name}\PYG{p}{)}\PYG{p}{)}

\end{sphinxVerbatim}
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in C\#}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id10}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k}{using}\PYG{+w}{ }\PYG{n+nn}{System}\PYG{p}{;}

\PYG{k}{public}\PYG{+w}{ }\PYG{k}{class}\PYG{+w}{ }\PYG{n+nc}{Hello}
\PYG{p}{\PYGZob{}}
\PYG{+w}{	}\PYG{k}{public}\PYG{+w}{ }\PYG{k}{static}\PYG{+w}{ }\PYG{k}{void}\PYG{+w}{ }\PYG{n+nf}{Main}\PYG{p}{(}\PYG{k+kt}{string}\PYG{p}{[}\PYG{p}{]}\PYG{+w}{ }\PYG{n}{args}\PYG{p}{)}
\PYG{+w}{	}\PYG{p}{\PYGZob{}}
\PYG{+w}{		}\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n}{nTests}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{k+kt}{int}\PYG{p}{.}\PYG{n}{Parse}\PYG{p}{(}\PYG{n}{Console}\PYG{p}{.}\PYG{n}{ReadLine}\PYG{p}{(}\PYG{p}{)}\PYG{p}{)}\PYG{p}{;}

\PYG{+w}{		}\PYG{k}{for}\PYG{+w}{ }\PYG{p}{(}\PYG{k+kt}{int}\PYG{+w}{ }\PYG{n}{i}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{l+m}{0}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{+w}{ }\PYG{o}{\PYGZlt{}}\PYG{+w}{ }\PYG{n}{nTests}\PYG{p}{;}\PYG{+w}{ }\PYG{n}{i}\PYG{o}{++}\PYG{p}{)}\PYG{+w}{ }\PYG{p}{\PYGZob{}}
\PYG{+w}{			}\PYG{k+kt}{string}\PYG{+w}{ }\PYG{n}{name}\PYG{+w}{ }\PYG{o}{=}\PYG{+w}{ }\PYG{n}{Console}\PYG{p}{.}\PYG{n}{ReadLine}\PYG{p}{(}\PYG{p}{)}\PYG{p}{;}
\PYG{+w}{			}\PYG{n}{Console}\PYG{p}{.}\PYG{n}{WriteLine}\PYG{p}{(}\PYG{l+s}{\PYGZdq{}Hello \PYGZdq{}}\PYG{o}{+}\PYG{n}{name}\PYG{o}{+}\PYG{l+s}{\PYGZdq{}!\PYGZdq{}}\PYG{p}{)}\PYG{p}{;}
\PYG{+w}{		}\PYG{p}{\PYGZcb{}}
\PYG{+w}{	}\PYG{p}{\PYGZcb{}}
\PYG{p}{\PYGZcb{}}
\end{sphinxVerbatim}
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in Pascal}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id11}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k}{program}\PYG{+w}{ }\PYG{n}{example}\PYG{p}{(}\PYG{n}{input}\PYG{o}{,}\PYG{+w}{ }\PYG{n}{output}\PYG{p}{)}\PYG{o}{;}

\PYG{k}{var}
\PYG{+w}{	}\PYG{n}{ntests}\PYG{o}{,}\PYG{+w}{ }\PYG{n}{test}\PYG{+w}{ }\PYG{o}{:}\PYG{+w}{ }\PYG{k+kt}{integer}\PYG{o}{;}
\PYG{+w}{	}\PYG{n}{name}\PYG{+w}{         }\PYG{o}{:}\PYG{+w}{ }\PYG{k}{string}\PYG{p}{[}\PYG{l+m+mi}{100}\PYG{p}{]}\PYG{o}{;}

\PYG{k}{begin}
\PYG{+w}{	}\PYG{n+nb}{readln}\PYG{p}{(}\PYG{n}{ntests}\PYG{p}{)}\PYG{o}{;}

\PYG{+w}{	}\PYG{k}{for}\PYG{+w}{ }\PYG{n}{test}\PYG{+w}{ }\PYG{o}{:}\PYG{o}{=}\PYG{+w}{ }\PYG{l+m+mi}{1}\PYG{+w}{ }\PYG{k}{to}\PYG{+w}{ }\PYG{n}{ntests}\PYG{+w}{ }\PYG{k}{do}
\PYG{+w}{	}\PYG{k}{begin}
\PYG{+w}{		}\PYG{n+nb}{readln}\PYG{p}{(}\PYG{n}{name}\PYG{p}{)}\PYG{o}{;}
\PYG{+w}{		}\PYG{n+nb}{writeln}\PYG{p}{(}\PYG{l+s}{\PYGZsq{}}\PYG{l+s}{Hello }\PYG{l+s}{\PYGZsq{}}\PYG{o}{,}\PYG{+w}{ }\PYG{n}{name}\PYG{o}{,}\PYG{+w}{ }\PYG{l+s}{\PYGZsq{}}\PYG{l+s}{!}\PYG{l+s}{\PYGZsq{}}\PYG{p}{)}\PYG{o}{;}
\PYG{+w}{	}\PYG{k}{end}\PYG{o}{;}
\PYG{k}{end}\PYG{o}{.}
\end{sphinxVerbatim}
\sphinxSetupCaptionForVerbatim{\sphinxstyleemphasis{A solution in Haskell}}
\def\sphinxLiteralBlockLabel{\label{\detokenize{team:id12}}}
\begin{sphinxVerbatim}[commandchars=\\\{\}]
\PYG{k+kr}{import}\PYG{+w}{ }\PYG{n+nn}{Prelude}

\PYG{n+nf}{main}\PYG{+w}{ }\PYG{o+ow}{::}\PYG{+w}{ }\PYG{k+kt}{IO}\PYG{+w}{ }\PYG{n+nb}{()}
\PYG{n+nf}{main}\PYG{+w}{ }\PYG{o+ow}{=}\PYG{+w}{ }\PYG{k+kr}{do}\PYG{+w}{ }\PYG{n}{input}\PYG{+w}{ }\PYG{o+ow}{\PYGZlt{}\PYGZhy{}}\PYG{+w}{ }\PYG{n}{getContents}
\PYG{+w}{          }\PYG{n}{putStr}\PYG{o}{.}\PYG{n}{unlines}\PYG{o}{.}\PYG{n}{map}\PYG{+w}{ }\PYG{p}{(}\PYG{n+nf}{\PYGZbs{}}\PYG{n}{x}\PYG{+w}{ }\PYG{o+ow}{\PYGZhy{}\PYGZgt{}}\PYG{+w}{ }\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{Hello }\PYG{l+s}{\PYGZdq{}}\PYG{+w}{ }\PYG{o}{++}\PYG{+w}{ }\PYG{n}{x}\PYG{+w}{ }\PYG{o}{++}\PYG{+w}{ }\PYG{l+s}{\PYGZdq{}}\PYG{l+s}{!}\PYG{l+s}{\PYGZdq{}}\PYG{p}{)}\PYG{o}{.}\PYG{n}{tail}\PYG{o}{.}\PYG{n}{lines}\PYG{+w}{ }\PYG{o}{\PYGZdl{}}\PYG{+w}{ }\PYG{n}{input}
\end{sphinxVerbatim}


\section{Improvements to DOMjudge}
\label{\detokenize{team:improvements-to-domjudge}}
\sphinxAtStartPar
The DOMjudge team would like your feedback. We do not receive much feedback from participants.
If you find something lacking or have improvement ideas, please report them. See \sphinxurl{https://www.domjudge.org/development}.



\renewcommand{\indexname}{Index}
\printindex
\end{document}