\author{Problem Author: Misha Ivkov}
\newcommand{\backuptowersheader}{Problem B: Backup Towers}

\begin{frame}{\backuptowersheader{}}
  \begin{block}{Problem}
    \begin{itemize}
      \item Given a grid with cell towers installed at some squares,
      compute for each cell the closest and second closest cell towers
      by Manhattan distance.
    \end{itemize}        
  \end{block}
\end{frame}
\begin{frame}{\backuptowersheader{}}
  \begin{block}{Solution}
    \begin{itemize}
      \item Perform a multisource BFS from each cell tower.
      \item If a given square has already seen two unique towers, prevent
      any other tower from BFSing into that square.
      \item To ensure that the smallest IDs are prioritized, insert
      the cell towers into the queue in sorted order.
    \end{itemize}        
  \end{block}
\end{frame}
