TORONTO KIDS COMPUTER CLUB | Aurora Saturday 14:30 Python Practice 22.09.10.
post-template-default,single,single-post,postid-21085,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.8.0,vc_responsive

Aurora Saturday 14:30 Python Practice 22.09.10.

15 Sep Aurora Saturday 14:30 Python Practice 22.09.10.


A missile interception system has been developed by a country to defend against enemy missile attacks. But there is a flaw in the missile interception system: Although its first artillery shells can reach any height, each shot cannot exceed the height of the previous pitch. One day, the radar caught the enemy’s missiles. As the system is still in the trial phase, So there is only one set of systems, so it is possible not to intercept all missiles.

What do we do? How many systems do you have? It’s easy to say it. Cost is a big problem. So I came here to call for help, please figure out how many sets of interception systems you need at least.


Enter several sets of data. Each group of data includes: Total number of missiles (positive integers), the height at which the missiles are flown (radar-given height data is a positive integer not greater than 30000, separated by a space)


corresponding to each set of data output intercept all missiles with a minimum of how many sets of this missile interception system.

Sample Input
8 389 207 155 300 299 170 158 65

Sample Output

No Comments

Sorry, the comment form is closed at this time.