There are n players in the game. Given that the i-th player dealt. Instead of formal definition of bar description, we will give an example. For some player i whose. Moreover, you have to mark the player with maximal damage dealt to enemies by replacing the last space into '*'. If there're multiple maximum, mark all of them.
When you are playing multiplayer games, you may want to show that you are the MVP of your team -- or blame the one always wandering and watching away from the storm center. Well, there're statistics that show you preformance, but sometimes numbers speak softer than charts. Now, you're hired to write a program that output ASCII art histograms showing damage dealt to enemies. There are n players in the game. Given that the i-th player dealt d_i d i damage to enemies where max_i d_i > 0 max i d i >0 is granted, you need to calculate the number s_i s i of spaces in the bar by the following foluma: s_i = lceil 50 frac {d_i} {max_i d_i} rceil s i =⌈50 max i d i d i ⌉ Instead of formal definition of bar description, we will give an example. For some player i whose s_i = 7 s i =7 and d_i = 777 d i =777, the bar is shown as: +-------+ | |777 +-------+ Moreover, you have to mark the player with maximal damage dealt to enemies by replacing the last space into '*'. If there're multiple maximum, mark all of them. See samples for more ideas.
标签: HBC209990DPS题解