
\documentclass[titlepage, oneside, a4paper]{article}

\usepackage {import}
\usepackage[margin=25mm, left=17mm, right=17mm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{fancyhdr}
\usepackage{comment}
\usepackage{olymp}
\usepackage{epigraph}
\usepackage{expdlist}
\usepackage{graphicx}
\usepackage{ulem}
\usepackage{lastpage}

%- if problem.blocks.preamble is defined
\VAR{problem.blocks.preamble}
%- endif

\def\showSourceFileName{1}
\newif\ifintentionallyblankpages % comment this out to add blank pages

\pagestyle{fancy}
\fancyhf{}
\renewcommand{\footrulewidth}{0.4pt}

\title{}
\author{}
\date{}

\makeatletter
\let\newtitle\@title
\let\newauthor\@author
\let\newdate\@date
\makeatother

\rhead{\newtitle}
\lhead{\newauthor}
\lfoot{\newdate}
\rfoot{\thepage}

\begin{document}

\begin{problem}
%- if problem.short_name is defined
[\VAR{problem.short_name}]
%- endif
{\VAR{problem.title | escape}}
{stdin}
{stdout}
{\VAR{problem.package.timeLimit / 1000 | round(1, 'floor')} s}
{\VAR{problem.package.memoryLimit} MB}

\VAR{problem.blocks.legend}

%- if problem.blocks.input is defined
\InputFile
\VAR{problem.blocks.input}
%- endif

%- if problem.blocks.output is defined
\OutputFile
\VAR{problem.blocks.output}
%- endif

\Examples

%- for sample in problem.samples
\begin{example}
	\exmpfile{\VAR{sample.inputPath}}{\VAR{sample.outputPath if sample.outputPath is not none else ''}}%
\end{example}
%- endfor

%- if problem.blocks.notes is defined
\Notes
\VAR{problem.blocks.notes}
%- endif

%- if problem.blocks.editorial is defined
\Editorial
\VAR{problem.blocks.editorial}
%- endif

\end{problem}

\end{document}
