python P1007 独木桥 RE+AC求条
  • 板块P1007 独木桥
  • 楼主xxxhhhmmm
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/12/31 14:35
  • 上次更新2024/12/31 21:12:29
查看原帖
python P1007 独木桥 RE+AC求条
1426272
xxxhhhmmm楼主2024/12/31 14:35
def f(L, pos):
    min_time = max([min(p, L + 1 - p) for p in pos])
    max_time = max([max(p, L + 1 - p) for p in pos])
    return min_time, max_time


L = int(input())
N = int(input())
pos = list(map(int, input().split()))

result = f(L, pos)
print(*result)
2024/12/31 14:35
加载中...