#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. (转)无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft.Office.Interop.Word._Application”。此操作失败的原因是对 IID 为“{00020970-

    HRESULT:0x80030002 无法将类型为“Microsoft.Office.Interop.Word.ApplicationClass”的 COM 对象强制转换为接口类型“Microsoft ...

  2. android studio新项目时提示:Plugin is too old, please update to a more recent version

    今天想写一个程序来测试一下android studo代码,但是创建好项目后,提示: Error:(1, 0) Plugin is too old, please update to a more re ...

  3. FPGA奇数分频

    在FPGA设计中,分频是很常用的一个基本功能,一般来说,如果需要偶数分频即2次幂的整数倍,这个就很简单了,如2.4.8.16.32.64等这些以2的整数倍的. 这里说的是奇数倍分频,如时钟是100MH ...

  4. GLSL语言基础

    from http://www.kankanews.com/ICkengine/archives/120870.shtml 变量 GLSL的变量命名方式与C语言类似.变量的名称可以使用字母,数字以及下 ...

  5. Android RadioGroup设置默认选中项

    今天有人问.Android 里面 RadioGroup里面有两个RadioButton怎么设置默认值? 第一个RadioButton设置 android:checked="true" ...

  6. 双击vbs时,默认cscript运行脚本

    Dim obj_shellset obj_shell = createobject("wscript.shell")host = WScript.FullNameIf LCase( ...

  7. Unknow Unknow

    Unknow Unknow,讲的大概意思是:你不知道这事情的时候,那么请不要轻易下任何结论.例如,这个太难了,放弃吧.嗯,这个是捷径.而最后却是,困难的路越走越容易,容易的路越走越难.只是一种常见的现 ...

  8. CSS隐藏元素的几种方法

    使用CSS隐藏元素的方法很多,在这里简单总结一下: 1.display:none display:none 应该是最常用的一种隐藏元素的方法,使用该方法隐藏的元素脱离文档流不占据空间,不会被浏览器解析 ...

  9. HIVE 启动出错总结

    1: [centos@centos4- bin]$ hive /home/centos/app/apache-hive--bin/bin/hive: line : /tmp/centos/stderr ...

  10. ---Arch Linux 之AUR

    只需下载压缩包,解压,进入文件夹,里面好像也只有一个PKBUILD文件,makepkg -s (自动下载程序然后编译打包), 然后pacman -U xxxx.pkg.xz 就好了