【链接】点击打开链接

【题意】

在这里写题意

【题解】

根据圆心到原点的距离这个东西判断一下圆在不在那个环里面就好

【错的次数】

0

【反思】

在这了写反思

【代码】

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <cstdlib>
#include <cmath>
using namespace std;
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define mp make_pair
#define pb emplace_back
#define fi first
#define se second
#define ld long double
#define ms(x,y) memset(x,y,sizeof x)
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rs(x) scanf("%s",x)
#define rf(x) scnaf("%lf",&x)
#define oi(x) printf("%d",x)
#define ol(x) printf("%lld",x)
#define oc putchar(' ')
#define os(x) printf(x)
#define all(x) x.begin(),x.end()
#define Open() freopen("F:\\rush.txt","r",stdin)
#define Close() ios::sync_with_stdio(0)
#define sz(x) ((int) x.size())
#define ld long doubletypedef pair<int,int> pii;
typedef pair<LL,LL> pll;//mt19937 myrand(time(0));
//int get_rand(int n){return myrand()%n + 1;}
const int dx[9] = {0,1,-1,0,0,-1,-1,1,1};
const int dy[9] = {0,0,0,-1,1,-1,1,-1,1};
const double pi = acos(-1.0);
const int N = 1e5;struct abc{LL x,y,r;
};LL R,D;
int n;
abc a[N+10];LL sqr(LL x){return x*x;
}int main(){//Open();//Close();rl(R),rl(D);ri(n);int ans = 0;rep1(i,1,n) {LL x,y,r;rl(x),rl(y),rl(r);LL temp = sqr(x)+sqr(y);long double temp1 = sqrt(temp)-r,temp2 = sqrt(temp)+r;if ( (R-D) <= temp1 && temp2 <= R) ans++;}oi(ans);puts("");return 0;
}

转载于:https://www.cnblogs.com/AWCXV/p/7626071.html

【Codeforces Round #430 (Div. 2) B】Gleb And Pizza相关推荐

  1. 【Codeforces Round #430 (Div. 2) D】Vitya and Strange Lesson

    [链接]点击打开链接 [题意] 给出一个数组,每次操作将整个数组亦或一个数x,问得到的数组的结果中的mex.mex表示为自然数中第一个没有出现过的数. [题解] 异或的效果是可以累加的,所以不用每次都 ...

  2. 【Codeforces Round #424 (Div. 2) C】Jury Marks

    [Link]:http://codeforces.com/contest/831/problem/C [Description] 有一个人参加一个比赛; 他一开始有一个初始分数x; 有k个评委要依次对 ...

  3. 【Codeforces Round #422 (Div. 2) C】Hacker, pack your bags!(二分写法)

    [题目链接]:http://codeforces.com/contest/822/problem/C [题意] 有n个旅行计划, 每个旅行计划以开始日期li,结束日期ri,以及花费金钱costi描述; ...

  4. 【Codeforces Round #420 (Div. 2) B】Okabe and Banana Trees

    [题目链接]:http://codeforces.com/contest/821/problem/B [题意] 当(x,y)这个坐标中,x和y都为整数的时候; 这个坐标上会有x+y根香蕉; 然后给你一 ...

  5. 【Codeforces Round #299 (Div. 2) B】Tavas and SaDDas

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 每次取出最小的数字,在后面加上一个4或一个7就好; 会发现最后的数字很少的. [代码] #include <bits/stdc ...

  6. 【Codeforces Round #446 (Div. 2) C】Pride

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 想一下,感觉最后的结果肯定是从某一段开始,这一段的gcd为1,然后向左和向右扩散的. 则枚举那一段在哪个地方. 我们设这一段中所有的 ...

  7. 【Codeforces Round #452 (Div. 2) C】 Dividing the numbers

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] n为偶数. l = 1, r = n (l,r)放在一组 l++,r-- 新的l,r放在另外一组 直到l+1==r 这个时候,判断两 ...

  8. 【Codeforces Round #442 (Div. 2) A】Alex and broken contest

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 注意是所有的名字里面,只出现了其中某一个名字一次. [代码] #include <bits/stdc++.h> usin ...

  9. 【Codeforces Round #450 (Div. 2) B】Position in Fraction

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 找循环节就好. ->其实可以不用找出来整个循环节. 有找到c就直接输出. 找到了循环节还没找到的话,直接输出无解. [代码] ...

最新文章

  1. 图像质量评价,图片放大和缩小
  2. Python TeamViewer批量提交密码重置--分析与实现
  3. ITIL的一些简单感受
  4. 携程基于大数据分析的实时风控体系
  5. MyBatis-学习笔记06【06.使用Mybatis完成DAO层的开发】
  6. 第30天:项目时间管理相关错题整理
  7. Mac模拟慢速网络 - Network Link Conditioner 安装和使用
  8. 微信小程序出现【需要进行身份验证】弹框解决方法
  9. Android 中使用MediaRecorder进行录像详解(视频录制)
  10. 使用 SAP Uiveri5 遇到 passport 依赖的问题以及解决方案
  11. 【 jquery 】常用
  12. intp适合学计算机吗,⑨MBTI测试,分析INTP型人格的专业选择和职业选择
  13. Python小白的数学建模课-B2. 新冠疫情 SI模型
  14. wordpress WBOLT 百度推送管理 3.4.6 Pro
  15. 不到4个小时,我找到了一枚苹果 0day
  16. python如何检查错误-python中的错误如何查看
  17. phpcms开启在线编辑模版 方法
  18. 基于DEAP库的python进化算法--遗传算法实践--配词问题
  19. 【你的数据库危机四伏 】
  20. 【元胞自动机】基于matlab元胞自动机城市规划【含Matlab源码 125期】

热门文章

  1. 感知算法论文(二)Pelee: A Real-Time Object Detection System on Mobile Devices(2018)译文
  2. python 线性回归_Python中的简化线性回归
  3. 银行真的已经是夕阳行业了吗?
  4. 过年遇到前任借钱, 如何傲娇的拒绝?
  5. 中国还有一个作家叫格非
  6. 腾讯云,物联网通信产品,动态注册步骤
  7. 视频图像处理平台对比_对比传统智能结算,戈子视觉结算有了质的改变
  8. python读取日志统计ip_如何通过命令行统计和排列访问日志里的ip数
  9. HMM——前向算法与后向算法
  10. UFLDL教程: Exercise: Implement deep networks for digit classification