problem.html (903B)
1 <p> 2 Time limit per test: 2 seconds 3 </p> 4 <p> 5 Memory limit per test: 256 megabytes 6 </p> 7 8 <p> 9 There are buildings in front of you with heights [a_0,a_1,...,a_{n-1}], where a_i is an integer. Assume each building has a depth of 100 units, there is a 10 unit gap between each of them, they are all directly in front of you, and the ground is flat. 10 </p> 11 12 <p> 13 The first building is 100 units in front of you, and your eyes are 6 units above ground level. How many buildings are visible? 14 </p> 15 16 <h2>Constraints</h2> 17 18 <ul> 19 <li> 10 <= a_i <= 10^6 </li> 20 <li> 1 <= n <= 2*10^5 </li> 21 </ul> 22 23 <h2>Inputs</h2> 24 25 <ul> 26 <li> first line: n </li> 27 <li> second line: the n integers of a </li> 28 </ul> 29 30 <h2>Examples</h2> 31 32 <h3>Input 1</h3> 33 34 <pre> 35 6 36 10 47 500 1000 2783 4616 37 </pre> 38 39 <h3>Output 1</h3> 40 41 <pre> 42 6 43 </pre> 44 45 <h3>Input 2</h3> 46 47 <pre> 48 8 49 100 187 100 1000 1250 10000 1238 47100 50 </pre> 51 52 <h3>Output 2</h3> 53 54 <pre> 55 4 56 </pre> 57 58 </p>