摘要:
每个系统的半径即为该系统拦截的导弹中距离系统坐标最远的导弹的距离,所以不妨先算出每个导弹距离1号系统的距离,然后以距1号系统的距离进行升序排序。然后从距离1号系统最远的那枚导弹开始,计算出比它距离1号系统的距离远的所有导弹中距离2号系统的距离最远的那个距离(即以它前一枚导弹为1号系统所拦截的最远的导 阅读全文
posted @ 2022-08-16 19:56
TheMagician
阅读(258)
评论(0)
推荐(0)
摘要:
分析:当高位数比低位数小时,删掉 如324 先删掉3 234 删4 #include<bits/stdc++.h>using namespace std;string s;int n,a[251];int main(){ cin>>s; scanf("%d",&n); int len=s.lengt 阅读全文
posted @ 2022-08-16 13:57
TheMagician
阅读(101)
评论(0)
推荐(0)
摘要:
分析:因为每次打完水都是最大的下一个,所以次数为m+已打完的人数,当打完后将这个水龙头赋为现在打的水的人的下一个#include<bits/stdc++.h> using namespace std; int b[200000],i,j,n,m,bj[20000],a[200000],as,falg 阅读全文
posted @ 2022-08-16 11:19
TheMagician
阅读(116)
评论(0)
推荐(0)
摘要:
分析:因为最多两个一组,所以可以按最大的和最小的一组,是否满足条件,如果满足,同时赋值0,. #include<bits/stdc++.h>using namespace std;int n,m,i,a[300000],s=0,j;int main(){ cin>>m>>n; for(i=1;i<= 阅读全文
posted @ 2022-08-16 08:50
TheMagician
阅读(44)
评论(0)
推荐(0)
摘要:
分析:每次移动都需要将其补全或删掉,如果这个正好是平均数,则步骤次数不增加 9 8 17 6 -1 -2 7 -4 0 -3 4 -4 0 0 4 -4 0 0 0 0 #include<bits/stdc++.h>using namespace std;int main(){ int n,s=0, 阅读全文
posted @ 2022-08-16 08:19
TheMagician
阅读(41)
评论(0)
推荐(0)
浙公网安备 33010602011771号