2021CCPC中国大学生程序设计竞赛女生专场 G. 3G网络

2021/11/6 1:11:39

本文主要是介绍2021CCPC中国大学生程序设计竞赛女生专场 G. 3G网络,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

题目链接

题目描述

在这里插入图片描述

解题思路

当 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);
}



这篇关于2021CCPC中国大学生程序设计竞赛女生专场 G. 3G网络的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程