| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 1024 MB | 151 | 116 | 109 | 76.224% |
The term "histogram" was first introduced in 1895 by Karl Pearson. This is also the year that the portable electric drill was invented. It may not be a coincidence that we speak about "data drilling" today. Most things back then were not electric however, and histograms were still hand crafted. Nowadays, we like things electric and automated. The Bureaucratic Affiliation for Printing Charts needs to create a lot of histograms for a lot of data points, so they come to you for help to automate the printing of histograms.
Given a list of data points, print a histogram.
The input consists of:
Output the histogram. That is, write a rectangle of characters. The rectangle should be as wide as the number of bins. Each column of the rectangle should have
-" at the bottom;#" as there are items in the bin;." as are needed to fill out the rectangle.The rectangle should be just high enough to display a "#" for each element in every bin, but no higher.
3 1 6 1 2 3 2 1 2
.#. ##. ### ---
3 10 5 1 9 11 29 24
#.# ### ---
6 10 5 19 20 21 42 42
.#..#. .##.#. ------
ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2021 Preliminaries H번