#include<iostream>
#include<cmath>
using namespace std;
int main(){
 int n;
 cin>>n;
 while(n--){
  int t;
  cin>>t;
  int points=0;
  while(t--){
   int a,b;
   cin>>a>>b;
   if((a>10&&a<50)&&(b>10&&b<50)){
    if(pow(a-30,2)+pow(b-30,2)<400)
    points+=1;
   }
   if((a>90&&a<110)&&b>20&&b<40) {
    if(pow(a-100,2)+pow(b-30,2)<100) points+=2;
   }
   if((a>165&&a<175)&&b>25&&b<35){
    if(pow(a-170,2)+pow(b-30,2)<25) points+=3;
   }
  }
  cout<<points<<endl;
 }
 return 0;
}

1795. Table tennis的更多相关文章

  1. PAT 1026. Table Tennis

    A table tennis club has N tables available to the public.  The tables are numbered from 1 to N.  For ...

  2. 1026. Table Tennis (30)

    题目如下: A table tennis club has N tables available to the public. The tables are numbered from 1 to N. ...

  3. PAT A1026 Table Tennis (30 分)——队列

    A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For a ...

  4. Codeforces Round #397 by Kaspersky Lab and Barcelona Bootcamp (Div. 1 + Div. 2 combined) C. Table Tennis Game 2 水题

    C. Table Tennis Game 2 题目连接: http://codeforces.com/contest/765/problem/C Description Misha and Vanya ...

  5. PAT 1026 Table Tennis[比较难]

    1026 Table Tennis (30)(30 分) A table tennis club has N tables available to the public. The tables ar ...

  6. 443 B. Table Tennis

    http://codeforces.com/contest/879/problem/B n people are standing in a line to play table tennis. At ...

  7. Table Tennis Game 2(找规律)

    Description Misha and Vanya have played several table tennis sets. Each set consists of several serv ...

  8. PAT甲级1026. Table Tennis

    PAT甲级1026. Table Tennis 题意: 乒乓球俱乐部有N张桌子供公众使用.表的编号从1到N.对于任何一对玩家,如果有一些表在到达时打开,它们将被分配给具有最小数字的可用表.如果所有的表 ...

  9. PAT 甲级 1026 Table Tennis(模拟)

    1026. Table Tennis (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A table ...

随机推荐

  1. 关于sql server远程访问Oracle数据库 OpenQuery查询返回多条数据的问题

    在Sql Server远程访问Oracle 中的数据库表时: 远程语法通常为: select * from OpenQuery(Oracle链接服务器名称,‘查询语句’) eg: select * f ...

  2. 关于SoCFPGA 编译问答

    1.在Qsys里面添加了一个新的组件(不是hps里面的东西),挂在Avalon总线上,如添加了一个新ADC组件,是否需要重新编译dtb. 答:  不需要. 2.修改了相关Qsys里面的东西,是否也需要 ...

  3. 十大关系数据库SQL注入工具一览

    摘要:众所周知,SQL注入攻击是最为常见的Web应用程序攻击技术.同时SQL注入攻击所带来的安全破坏也是不可弥补的.以下罗列的10款SQL工具可帮助管理员及时检测存在的漏洞. BSQL Hacker ...

  4. 云存储性能测试工具--COSBench安装

    COSBench安装 Cosbench是Intel的开源云存储性能测试软件,COSBench目前已经广泛使用与云存储测试,并作为云存储的基准测试工具使用 1 环境 1.1 操作系统 COSBench可 ...

  5. Python复习笔记-字典和文件操作

    抽时间回顾2年前自己做过的python工具,突然感觉不像自己写的,看来好久没用过python的字典和文件操作了,查询资料和网页,整理如下: 一.字典 键值对的集合(map) 字典是以大括号“{}”包围 ...

  6. [Linux]删除7天前的目录

    find /ftp_data/ -mindepth 2 -type d -mtime +7 -exec rm -rf {} \;

  7. C# byte数组转换成List<String>

    byte[] bys=buffer; string[] AllDataList=  Encoding.Default.GetString(bys).Split(Environment.NewLine. ...

  8. linux 错误处理

    linux程序设计中,有许多系统调用和函数会因为各种原因而失败.在失败时设置外部变量errno的值来指明失败原因.程序必须在函数报告出错之后立即检查errno变量,因为它可能被下一个函数调用所覆盖(外 ...

  9. mysql - 行号

    1. 初始化数据 - 列唯一 DROP TABLE IF EXISTS `sales`; CREATE TABLE `sales` ( `empid` ) NOT NULL, `mgrid` ) NO ...

  10. 循序渐进Python3(二) -- 数据类型

    数据类型 一.数字(int) Python可以处理任意大小的正负整数,但是实际中跟我们计算机的内存有关,在32位机器上,整数的位数为32位,取值范围为 -2**31-2**31-1,在64位系统上,整 ...