题目链接
当 r->∞ 时,圆相当于几乎重合,所以答案是1/n
#include<iostream> #include<stdio.h> #include<vector> #include<string> #include<algorithm> #include<map> #include<queue> using namespace std; const int maxn = 1e5+7; const int mod = 1e9+7; #define ll long long int x[maxn]; int y[maxn]; int main(){ int n; scanf("%d",&n); for(int i=1;i<=n;i++){ scanf("%d",&x[i]); scanf("%d",&y[i]); } printf("%.15lf\n", 1.0/(double)n); }