problem.html (872B)
1 <p> 2 3 Time limit per test: 2 seconds 4 Memory limit per test: 256 megabytes 5 6 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. 7 8 The first building is 100 units in front of you, and your eyes are 6 units above ground level. How many buildings are visible? 9 10 </p> 11 12 <h2>Constraints</h2> 13 14 <p> 15 16 <ul> 17 <li> 10 <= a_i <= 10^6 </li> 18 <li> 1 <= n <= 2*10^5 </li> 19 </ul> 20 21 </p> 22 23 <h2>Inputs</h2> 24 25 <p> 26 27 <ul> 28 <li> first line: n </li> 29 <li> second line: the n integers of a </li> 30 </ul> 31 32 </p> 33 34 <h2>Examples</h2> 35 36 <p> 37 38 Input 1: 39 40 <pre> 41 6 42 10 47 500 1000 2783 4616 43 </pre> 44 45 Output 1: 46 47 <pre> 48 6 49 </pre> 50 51 Input 2: 52 53 <pre> 54 8 55 100 187 100 1000 1250 10000 1238 47100 56 </pre> 57 58 Output 2: 59 60 <pre> 61 4 62 </pre> 63 64 </p>