| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 72570 | 朱震耀老师 | 导弹拦截问题 | Python3 | Wrong Answer | 32 MS | 3772 KB | 452 | 2024-05-11 11:02:11 |
def intercept_missiles(heights): if not heights: return 0 intercept_count = 1 max_height = heights[0] for height in heights[1:]: if height > max_height: intercept_count += 1 max_height = height return intercept_count def main(): heights = list(map(int, input().split())) cnt = intercept_missiles(heights) print(cnt) if __name__ == "__main__": main()
------Input------
123 256 369 213 456 956 23 698 1236 321 500 666
------Answer-----
6
------Your output-----
9