\documentclass[11pt,a4paper,oneside]{article}

\usepackage[T2A]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage[russian]{olymp}
\usepackage{graphicx}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{epsfig}
\usepackage{wrapfig}

\contest
{Всероссийская олимпиада школьников по информатике 2010, Ханты-Мансийск}
{Задача 6}
{23 апреля 2010}

\renewcommand{\t}[1]{\ifmmode{\mathtt{#1}}\else{\texttt{#1}}\fi}
\newcommand{\eps}{\varepsilon}
\renewcommand{\le}{\leqslant}
\renewcommand{\ge}{\geqslant}
\renewcommand{\leq}{\leqslant}
\renewcommand{\geq}{\geqslant}
\renewcommand{\phi}{\varphi}
\newcommand{\pow}{\^\relax}
\newcommand{\bs}{\mbox{$\backslash$}}
\def\bbZ{\mathbb{Z}}
\newcommand{\clarify}[1]{{\it *** {#1} ***}}

\binoppenalty=10000
\relpenalty=10000
\exhyphenpenalty=10000

\begin{document}

\raggedbottom

