\author{Problem Author: Nick Wu}
\newcommand{\figureskatingjudgingheader}{Problem F: Figure Skating Judging}

\begin{frame}{\figureskatingjudgingheader{}}
  \begin{block}{Problem}
    \begin{itemize}
      \item Given $n$ integers, find $k$ of them with minimal variance.
    \end{itemize}        
  \end{block}
\end{frame}
\begin{frame}{\figureskatingjudgingheader{}}
  \begin{block}{Solution}
    \begin{itemize}
      \item If we sort the integers, we can prove that the minimal variance
      can be obtained by only considering subarrays.
      \item We can compute the variance for all subarrays by maintaining
      a sliding window. It suffices to maintain the sum of the
      integers in the window and the sum of the squares of
      the integers in the window.
    \end{itemize}        
  \end{block}
\end{frame}
