【链接】点击打开链接


【题意】


在这里写题意

【题解】


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

【错的次数】


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 double typedef 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;
}

最新文章

  1. [LeetCode] Min Stack 最小栈
  2. Windows下程序打包发布时的小技巧
  3. EBS 消息总线
  4. 【管理心得之九】奉劝那些把组织“玩弄于鼓掌之间”的OL们。(别让组织看见此篇)
  5. List集合概述
  6. ADO.NET provider with invariant name &#39;System.Data.SqlClient&#39; could not be loaded
  7. Loadrunner中web_reg_save_param的使用详解
  8. notepad++ 行末尾添加指定字符
  9. NoSQL数据库:数据的一致性
  10. [HZAU]华中农业大学第四届程序设计大赛网络同步赛
  11. datetime 和 smalldatetime
  12. composer安装第三方库
  13. HDU1237 简单的计算器 【堆】+【逆波兰式】
  14. java 添加一个线程、创建响应的用户界面 。 演示示例代码
  15. 验证视图状态 MAC 失败,解决方法
  16. 【BZOJ1058】【ZJOI2007】报表统计(链表,堆,Splay)
  17. Linux安装Gradle
  18. linux操作系统-源码包安装jdk1.7
  19. 背水一战 Windows 10 (57) - 控件(集合类): ListViewBase - 增量加载, 分步绘制
  20. ftp配置文件

热门文章

  1. iOS之UIBezierPath贝塞尔曲线属性简介
  2. RabbitMQ安装到使用入门
  3. @Restcontroller与@controller区别
  4. 网络结构解读之inception系列五:Inception V4
  5. 网络流Sap算法
  6. PageHelper原理
  7. sudo apt-get update报错E: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。
  8. Delphi 设计模式:《HeadFirst设计模式》Delphi2007代码---组合模式之Menus[转]
  9. 单例模式(Singleton)(单一实例)
  10. WCF常见问题