标签:== const space tps for acm main vector get
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cmath>
const int maxn = 4e2+5;
const int inf = 0x3f3f3f3f;
const double eps = 1e-5;
using namespace std;
int read(){
int x=0,f=1;char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
while(isdigit(ch)){x=x*10+ch-'0';ch=getchar();}
return f*x;
}
int x[maxn],y[maxn],r[maxn];
int main(){
int n=read();
for(int i=1;i<=n;i++){
x[i]=read();
y[i]=read();
r[i]=read();
}
for(int i=1;i<=n;i++){
int ans = 0;
for(int j=1;j<=n;j++){
if(pow(x[i]-x[j],2)+pow(y[i]-y[j],2)<pow(r[i]+r[j],2))ans++;
}
cout<<ans-1<<endl;
}
return 0;
}
标签:== const space tps for acm main vector get
原文地址:https://www.cnblogs.com/Emcikem/p/11921483.html