题解
2023-10-13 18:51:01
发布于:广东
32阅读
0回复
0点赞
#include<bits\stdc++.h>
using namespace std;
const int N = 1000000000001;
int a[N],n,t,minn = N,maxx = -N;
int main()
{
cin >> n;
for (int i = 1;i <= n;i++)
{
cin >> a[i];
}
for (int i = 1;i <= n; i++)
{
cin >> t;
if (minn > a[i] - t)
{
minn = a[i] - t;
}
if (maxx <= a[i] + t)
{
maxx = a[i] + t;
}
}
printf("%.1f", (minn + maxx) * 1.0\2);
return 0;
}
这里空空如也
有帮助,赞一个