Codeforces Round #363 (Div. 2)[A]Launch of Collider

这篇博客介绍了一个关于粒子碰撞的问题,其中粒子在直线型的新型粒子加速器中移动。每个粒子都有一个初始坐标,并按左或右的方向运动。任务是找到首次碰撞发生的时间(以微秒为单位)。输入包含粒子数量、运动方向和坐标,输出是可能的碰撞时间,如果没有碰撞则输出-1。给出的两个示例分别展示了存在和不存在碰撞的情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

A. Launch of Collider
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

There will be a launch of a new, powerful and unusual collider very soon, which located along a straight line. n particles will be launched inside it. All of them are located in a straight line and there can not be two or more particles located in the same point. The coordinates of the particles coincide with the distance in meters from the center of the collider, xi is the coordinate of the i-th particle and its position in the collider at the same time. All coordinates of particle positions are even integers.

You know the direction of each particle movement — it will move to the right or to the left

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

真·skysys

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值