223 lines
9.2 KiB
TeX
223 lines
9.2 KiB
TeX
\documentclass[11pt]{article}
|
|
\usepackage{fontspec}
|
|
\usepackage[margin=2.2cm]{geometry}
|
|
\usepackage{booktabs}
|
|
\usepackage{tabularx}
|
|
\usepackage{enumitem}
|
|
\usepackage{fancyhdr}
|
|
\usepackage[hidelinks]{hyperref}
|
|
\setmainfont{TeX Gyre Heros}
|
|
\setmonofont{TeX Gyre Cursor}[Scale=1.05]
|
|
\setlength{\parindent}{0pt}
|
|
\setlength{\parskip}{6pt}
|
|
\setlist{itemsep=2pt,topsep=2pt}
|
|
\pagestyle{fancy}
|
|
\fancyhf{}
|
|
\renewcommand{\headrulewidth}{0pt}
|
|
\fancyfoot[L]{\small ACPC 2026 Technical Notes}
|
|
\fancyfoot[R]{\small Page \thepage}
|
|
\newcommand{\cmd}[1]{\texttt{#1}}
|
|
|
|
\begin{document}
|
|
|
|
{\LARGE\bfseries Technical Notes}\par\vspace{2pt}
|
|
{\large Atlantic Canadian Programming Competition 2026}\par
|
|
\vspace{8pt}
|
|
|
|
Please read these notes before the contest.
|
|
They describe the contest system, the languages and the commands available on your machine.
|
|
|
|
\section*{Contest system}
|
|
|
|
The contest runs on Kattis, at \url{https://atlantic-canada26.kattis.com}.
|
|
Firefox opens on the contest page. The bookmarks bar and the Contest menu of the Applications menu lead to the contest, the problems and the standings.
|
|
Log in with your team's Kattis username or email address and password, then submit your solutions from the page of each problem.
|
|
External sign-in providers and webmail are unavailable on the contest machines. Ask staff if you cannot use the team's password.
|
|
The sample input and output of each problem are on its page.
|
|
|
|
The contest starts on Friday, October 23, 2026 at 13:00 Atlantic time and lasts 5 hours.
|
|
The clock of your machine is synchronized, so it shows the same time as Kattis.
|
|
|
|
\section*{All programs}
|
|
|
|
\begin{itemize}
|
|
\item Your program reads its input from standard input and writes its output to standard output.
|
|
Output sent to standard error is ignored, but a large amount of it can slow your program down.
|
|
\item A program that ends with a non-zero exit code is judged as a run time error.
|
|
\item The memory limit and the time limit are given on the page of each problem.
|
|
\end{itemize}
|
|
|
|
\section*{Languages}
|
|
|
|
The languages of the contest are C, C++, Java and Python~3.
|
|
The compilers on your machine are the same versions as on Kattis.
|
|
|
|
\smallskip
|
|
\begin{tabularx}{\linewidth}{@{}l l X@{}}
|
|
\toprule
|
|
Language & Version & File extensions \\
|
|
\midrule
|
|
C & gcc-15 15.2.0 & \cmd{.c} \\
|
|
C++ & g++-15 15.2.0 & \cmd{.cpp}, \cmd{.cc}, \cmd{.C}, \cmd{.cxx}, \cmd{.c++} \\
|
|
Java & javac and java 25.0.4.1 & \cmd{.java} \\
|
|
Python 3 & PyPy 7.3.23 (Python 3.11.15) & \cmd{.py}, \cmd{.py3} \\
|
|
\bottomrule
|
|
\end{tabularx}
|
|
|
|
\section*{Compiling and running on your machine}
|
|
|
|
You can test your programs any way you like.
|
|
The commands below use the same compiler options as Kattis, so they are the closest match to the way your submissions are judged.
|
|
They do not enforce the time and memory limits.
|
|
|
|
\subsection*{C}
|
|
|
|
\begin{tabular}{@{}ll@{}}
|
|
Compile & \cmd{compilec prog.c} \\
|
|
Run & \cmd{runc < input.txt} \\
|
|
\end{tabular}
|
|
|
|
\cmd{compilec} runs \cmd{gcc-15 -g -O2 -o a.out -std=gnu23 -static prog.c -lm}, which is the command of Kattis.
|
|
\cmd{runc} runs \cmd{./a.out}.
|
|
\cmd{compilegcc} is another name for \cmd{compilec}.
|
|
|
|
\subsection*{C++}
|
|
|
|
\begin{tabular}{@{}ll@{}}
|
|
Compile & \cmd{compilecpp prog.cpp} \\
|
|
Run & \cmd{runcpp < input.txt} \\
|
|
\end{tabular}
|
|
|
|
\cmd{compilecpp} runs the same command as Kattis.\\
|
|
\cmd{g++-15 -g -O2 -o a.out -std=gnu++23 -static -lrt}\\
|
|
\cmd{\ \ -Wl,--whole-archive -lpthread -Wl,--no-whole-archive prog.cpp}\\
|
|
\cmd{runcpp} runs \cmd{./a.out}.
|
|
\cmd{compileg++} is another name for \cmd{compilecpp}.
|
|
|
|
\subsection*{Java}
|
|
|
|
\begin{tabular}{@{}ll@{}}
|
|
Compile & \cmd{compilejava Prog.java} \\
|
|
Run & \cmd{runjava Prog < input.txt} \\
|
|
\end{tabular}
|
|
|
|
\cmd{compilejava} runs the same command as Kattis.\\
|
|
\cmd{javac -encoding UTF-8 -sourcepath . -cp "./*" -d . Prog.java}\\
|
|
\cmd{runjava} takes the name of the class that contains \cmd{main} and runs\\
|
|
\cmd{java -Dfile.encoding=UTF-8 -XX:+UseSerialGC -Xss64m}\\
|
|
\cmd{\ \ -XX:TieredStopAtLevel=1 -XX:ActiveProcessorCount=2}\\
|
|
\cmd{\ \ -Xms2048m -Xmx2048m -cp ".:./*" Prog}
|
|
|
|
Kattis sets \cmd{-Xms} and \cmd{-Xmx} to the memory limit of the problem.
|
|
\cmd{runjava} uses 2048~MB.
|
|
To test with another limit, for instance 1024~MB, run\\
|
|
\cmd{MEMLIM=1024 runjava Prog}
|
|
|
|
We suggest not using a \cmd{package} statement.
|
|
|
|
\subsection*{Python 3}
|
|
|
|
\begin{tabular}{@{}ll@{}}
|
|
Check the syntax & \cmd{compilepython3 prog.py} \\
|
|
Run & \cmd{runpython3 prog.py < input.txt} \\
|
|
\end{tabular}
|
|
|
|
Kattis runs Python~3 programs with PyPy (\cmd{pypy3 prog.py}), not with the usual Python interpreter.
|
|
\cmd{runpython3} runs \cmd{pypy3 prog.py} in the same way.
|
|
The \cmd{python3} command of the machine is a different interpreter (CPython 3.14) and does not match Kattis.
|
|
\cmd{compilepython3} only checks the syntax (\cmd{pypy3 -m py\_compile prog.py}).
|
|
|
|
\clearpage
|
|
\section*{Running programs from an IDE}
|
|
|
|
The contest compilers and interpreters are already configured in the IDEs below.
|
|
The actions described here use the language versions and options on the previous pages.
|
|
They do not enforce the problem's time or memory limits.
|
|
|
|
Save your source file before building, then type input in the terminal or Console/Run panel that opens.
|
|
For Java, give the public class the same name as the file and leave out the \cmd{package} statement.
|
|
Only submit source files to Kattis.
|
|
|
|
\subsection*{Geany}
|
|
|
|
You can use Geany for C, C++, Java and Python~3.
|
|
Press F9 to build your program or check its syntax, then F5 to run it in a terminal.
|
|
For C and C++, F8 compiles without linking, so use F9 before F5.
|
|
|
|
\subsection*{Code::Blocks}
|
|
|
|
Open your C or C++ source file and press F9 to build and run it.
|
|
The default ACPC GCC 15 profile uses the appropriate compiler for each language.
|
|
If the compiler-detection window appears on the first launch, confirm with \textbf{OK}.
|
|
|
|
\subsection*{VS Code}
|
|
|
|
You can use VS Code for C, C++, Java and Python~3.
|
|
Open VS Code from the Applications menu to work in \cmd{\textasciitilde/contest}, or open your own source folder.
|
|
If VS Code asks whether you trust your own folder, choose \textbf{Yes}.
|
|
Select your source file in the editor and press F6 for \textbf{ACPC: Build and run}.
|
|
Type input in the Terminal panel. Ctrl+Shift+B only builds the program.
|
|
|
|
For Java, use F6 to compile with \cmd{javac} and the Kattis options.
|
|
The ordinary Java Run action uses Eclipse's Java compiler instead.
|
|
|
|
\subsection*{CLion}
|
|
|
|
You can use CLion for C, C++ and Python~3.
|
|
Open your source folder, then your file, and wait for indexing to finish.
|
|
For C and C++, use the green arrow beside \cmd{main}.
|
|
For Python, right-click the file and choose \textbf{Run}. The default interpreter is PyPy.
|
|
If the Evaluation Feedback window appears, choose \textbf{No Thanks}.
|
|
|
|
\subsection*{IntelliJ IDEA}
|
|
|
|
Open the folder containing your Java file.
|
|
Use the green arrow beside \cmd{main}, then choose \textbf{Run}.
|
|
New projects use Java 25 and the runtime options given in the Java section.
|
|
|
|
\subsection*{PyCharm}
|
|
|
|
Open the folder containing your Python file.
|
|
Right-click the file and choose \textbf{Run}, or use the green arrow.
|
|
The default interpreter is PyPy.
|
|
|
|
\subsection*{Eclipse}
|
|
|
|
You can use Eclipse for C, C++, Java and Python~3.
|
|
The Applications menu opens the contest workspace.
|
|
Put your files in \cmd{\textasciitilde/contest}, expand the \textbf{contest} project and open your source file.
|
|
From the external-tools dropdown, shown as a green arrow with a toolbox, choose \textbf{ACPC Build and run}.
|
|
Type input in the Console panel.
|
|
|
|
For Java, use this action to compile with \cmd{javac} and the Kattis options.
|
|
The ordinary Java Run action uses Eclipse's Java compiler instead.
|
|
Select the source file again before starting another run.
|
|
If you copy files into the folder, press F5 in the project tree to show them.
|
|
|
|
\subsection*{Project settings}
|
|
|
|
No compiler path needs to be entered for the actions above.
|
|
You can skip the theme tour if it appears when you first open CLion, IntelliJ IDEA or PyCharm.
|
|
|
|
An existing project, a different Eclipse workspace, a new Python virtual environment or a compiler you select yourself can change these settings.
|
|
Use the supplied workspace and default interpreter, or check your program with the \cmd{compile*} and \cmd{run*} commands before submitting.
|
|
|
|
\section*{Your machine}
|
|
|
|
\begin{itemize}
|
|
\item You are logged in automatically with the account \cmd{team}.
|
|
Keep your files in your home directory (\cmd{/home/team}).
|
|
\item You can use CLion, Code::Blocks, Eclipse, IntelliJ IDEA, PyCharm or VS Code.
|
|
Vim, Gvim, Emacs, Geany, Kate, gedit and nano are also available.
|
|
They are in the Applications menu, except nano, which runs in a terminal.
|
|
\item The documentation of the languages is at \url{https://devdocs/} (bookmark ``Language Documentation'').
|
|
It has the documentation of C, C++, Java 25 and Python 3.11, and works without Internet access.
|
|
In a terminal, \cmd{man 3 printf} shows the manual of a C library function and \cmd{pypy3 -m pydoc heapq} the documentation of a Python module.
|
|
\item ``Contest Help (offline)'' in the bookmarks bar and the Contest menu contains searchable summaries about input and output, judging, local testing and common C, C++, Java and Python questions.
|
|
It works without Internet access. The source links in the articles lead to the online Kattis help portal, which is unavailable during the contest.
|
|
\item The network only gives access to the contest site, the Kattis status page and the documentation.
|
|
Every other website is blocked.
|
|
\end{itemize}
|
|
|
|
\end{document}
|