Around and Around We Go: Difference between revisions

From programming_contest
Jump to navigation Jump to search
imported>Kmk21
Created page with "This problem asks us to print out the words to a round in a certain way such that the two voices line up properly. It is 100% about formatting output correctly. # store the s..."
 
imported>Kmk21
No edit summary
Line 7: Line 7:


[[Category:ICPC Problems]]
[[Category:ICPC Problems]]
[[Category:Midatl2017]]
[[Category:Midatl2016]]
[[Category:Algorithm Easy]]
[[Category:Algorithm Easy]]
[[Category:Implementation Medium]]
[[Category:Implementation Medium]]
[[Category:Strings]]
[[Category:Strings]]
[[Category:Output]]
[[Category:Output]]

Revision as of 03:27, 2 November 2017

This problem asks us to print out the words to a round in a certain way such that the two voices line up properly. It is 100% about formatting output correctly.

  1. store the start times for each syllable of each voice in their own queue.
  2. While printing, pop whichever syllable comes next, or both, if required. Push underscores to any lines which are not printed

Note: be sure to add enough underscores to fill up time for long syllables (the third print condition in the problem statement)