\documentclass[12pt]{article}
\usepackage{fullpage,url,amssymb,epsfig,color,xspace,tikz,amsmath}
\usepackage[pdftitle={CS 240 Programming Question 1},
pdfsubject={University of Waterloo, CS 240, Fall 2022},
pdfauthor={Collin Roberts}]{hyperref}
\usepackage{graphicx}
\renewcommand{\thesubsection}{Problem \arabic{subsection}}
\begin{document}
\vspace*{-2cm}
\begin{center}
{\Large\bf University of Waterloo}\\
\vspace{3mm}
{\Large\bf CS240 - Fall 2022}\\
\vspace{2mm}
{\Large\bf Programming Question 1}\\
\vspace{3mm}
\textbf{Due Date: Wednesday October 26 at 5pm}
\end{center}

\definecolor{care}{rgb}{0,0,0}
\def\question#1{\item[\bf #1.]}
\def\part#1{\item[\bf #1)]}
\newcommand{\pc}[1]{\mbox{\textbf{#1}}} % pseudocode


\noindent
Please read
\url{https://student.cs.uwaterloo.ca/~cs240/f22/assignments.phtml#guidelines} for guidelines on submission.
Submit your solution electronically on Marmoset as described below.

\noindent
There are 6 possible marks available.
%The assignment will be marked out of 49.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{[6 marks]}
Implement your algorithm from Assignment 2, Problem 5 using C++ and compiled using g++ -std=c++17 in the linux.student.cs.uwaterloo.ca environment.
Please note that implementations that are not in $O(1+k)$ will \textbf{not} receive full marks.

\noindent
Your program should read from {\tt cin} the size $n$, then the $n$ integers in the heap $A[0\ldots n-1]$, and finally the integer $c$,
and then write to {\tt cout} the integers in the heap that are greater than or equal to $c$.
You may assume that every integer in the input is at least 0 and at most $2^{31}-1$ (so that every integer will fit into a variable of type \verb|int|).

\noindent
Every integer in the input and output should be on a separate line.
So for instance if the input consists of the following lines:

\begin{center}\fbox{\begin{minipage}{.5\textwidth}
  \tt
  5  \\
  17 \\
  15 \\
  13 \\
  10 \\
  3 \\
  12 
\end{minipage}}\end{center}

\noindent
then your program should print out the integers \verb|17|, \verb|15|,
and \verb|13| in any order (and on separate lines).
Note, `5' represents n, so the next 5 numbers `17, 15, 13, 10, 3' represent what goes in the heap, and `12' represents c.

\noindent
Submit the code for your \verb|main| function, along with any helper
functions, in a file called \verb|report.cpp|.

\end{document}