用户输出
5
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#4871 | #1028. 愤怒的小鸟 | Wrong Answer | 0 | 2749 ms | 25952 K | Python 3 / 561 B | harkerbest | 2024-02-20 20:59:37 |
n, k = map(int, input().split())
birds = []
for _ in range(n):
l, r = map(int, input().split())
birds.append((l, r))
def max_birds_shot(n, k, birds):
birds = sorted([(x[0], x[1]) for x in birds], key=lambda x: x[1])
max_birds = 0
last_shot_time = float('-inf')
for bird in birds:
start_shoot_time = max(last_shot_time + k, bird[0])
if start_shoot_time <= bird[1]:
max_birds += 1
last_shot_time = start_shoot_time
return max_birds
print(max_birds_shot(n, k, birds))
用户输出
5
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
15 3
-30 -22
-37 -9
-27 -21
31 48
-42 -35
-41 23
-47 18
31 44
4 6
-15 39
-32 32
-30 45
-44 -39
-45 -
<10 bytes omitted>
用户输出
15
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
20 18
-71 -47
-97 -67
2 78
-33 33
-57 59
-54 80
-82 60
-38 -1
-8 95
-10 69
-65 25
-13 -10
-29 0
-83
<46 bytes omitted>
用户输出
10
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
800 7
277 436
-685 191
-345 -320
-9 36
-265 759
-121 672
-206 -145
-725 -377
-701 527
-631 -290
-414
<7191 bytes omitted>
用户输出
228
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
1000 2
160 397
-649 -255
101 436
-703 562
-981 173
-671 -473
790 825
-677 721
-626 837
-914 -758
-33
<9035 bytes omitted>
用户输出
934
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
5000 19
-4844 -1293
-4329 -1473
-4921 3983
-5000 -2962
-2462 -849
-3308 -1040
480 3295
-3438 -738
15
<54717 bytes omitted>
用户输出
526
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100000 5
-111653 146070
-248065 -241611
-494919 -320505
-208949 -127576
-208235 -155124
-156018 2625
<1497026 bytes omitted>
用户输出
99996
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100000 6
275526 431817
-464616 -317042
-497451 385826
-248348 384090
-62913 87091
233199 425778
-339
<1497050 bytes omitted>
用户输出
99987
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
100000 6
-1462 -1046
-1876 129
1206 1241
-1616 -1191
-1356 -995
-1950 -1848
-1152 -927
-1472 -546
-1
<1037988 bytes omitted>
用户输出
667
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0