C++ reading input for programming contests
<p>What is the easiest way code parsing string input like the following:</p>

<pre><code>WORD WORD2
WORD3 WORD4

WORD5
WORD6
</code></pre>

<p>That is, an unknown number of pairs of words followed by a blank line followed by an unknown number of words one-per line.  I want to put the first group of these words into a map, and the second list of words into a vector.</p>

<p>Using <code>getline</code> has problems discovering when the first group of paired words terminates.</p>
