TCCC '24 Apr P3 - Soaring Skylines

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

Thornhill Computer Club 2024 - April Contest - Problem 3

City skylines are always scenic to look at! Write a program that draws a city skyline using the * character given the number of buildings the skyline contains and the dimensions of each building.

Input Specifications

The first line of input will consist of the integer N (1 \le N \le 10^3), representing the number of buildings the city skyline will contain.

The next N lines will consist of two space-separated integers H (1 \le H \le 10^2) and W (1 \le H \le 10^2), representing the height and width of each individual building respectively.

Output Specifications

Print each building in the city skyline without any spaces in between

Sample Input 1

6
3 2
2 3
6 3
4 2
2 1
1 1

Sample Output 1

     ***
     ***
     *****
**   *****
***********
************

Comments

There are no comments at the moment.