1795. Table tennis
#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的更多相关文章
- PAT 1026. Table Tennis
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For ...
- 1026. Table Tennis (30)
题目如下: A table tennis club has N tables available to the public. The tables are numbered from 1 to N. ...
- 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 ...
- 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 ...
- PAT 1026 Table Tennis[比较难]
1026 Table Tennis (30)(30 分) A table tennis club has N tables available to the public. The tables ar ...
- 443 B. Table Tennis
http://codeforces.com/contest/879/problem/B n people are standing in a line to play table tennis. At ...
- Table Tennis Game 2(找规律)
Description Misha and Vanya have played several table tennis sets. Each set consists of several serv ...
- PAT甲级1026. Table Tennis
PAT甲级1026. Table Tennis 题意: 乒乓球俱乐部有N张桌子供公众使用.表的编号从1到N.对于任何一对玩家,如果有一些表在到达时打开,它们将被分配给具有最小数字的可用表.如果所有的表 ...
- PAT 甲级 1026 Table Tennis(模拟)
1026. Table Tennis (30) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue A table ...
随机推荐
- JAVA设计模式之责任链模式
在阎宏博士的<JAVA与模式>一书中开头是这样描述责任链(Chain of Responsibility)模式的: 责任链模式是一种对象的行为模式.在责任链模式里,很多对象由每一个对象对其 ...
- The trash has reached its maximum size
From: http://hi.baidu.com/aipie0066/item/1d7fb3e3a4710b3a4cdcaf5e The trash has reached its maximum ...
- 使用maven创建web项目
eclipse 4.5.2中集成了maven,所以我们不用再去安装插件啦. 点击file->new->other->maven->maven project 选择了worksp ...
- 初学javaweb,远离各自框架
OSCHINA 软件库有一个分类--Web框架,该分类中包含多种编程语言的将近500个项目. Web框架是开发者在使用某种语言编写Web应用服务端时关于架构的最佳实践.很多Web框架是从实际的Web项 ...
- SQLSERVER | 查询数据库中所有的表的名字 | 查询数据库中的所有数据库名
SQLSERVER 1.查询某个数据库中所有的表名: SELECT Name FROM SysObjects Where XType='U' ORDER BY Name 2.查询数据库中的所有数据库 ...
- delphi XE Berlin ReadProcessMemory WriteProcessMemory
delphi XE,Berlin [dcc32 Error] Unit9.pas(93): E2033 Types of actual and formal var parameters must ...
- java并发库_并发库知识点整理
并发库(java.util.concurrent)中的工具数不胜数,那么我们梳理一下线程并发库中重要的一些常用工具: 1.
- 机器学习中的算法——决策树模型组合之随机森林与GBDT
前言: 决策树这种算法有着很多良好的特性,比如说训练时间复杂度较低,预测的过程比较快速,模型容易展示(容易将得到的决策树做成图片展示出来)等.但是同时,单决策树又有一些不好的地方,比如说容易over- ...
- 关于mysql 的一些零碎.
/* 又在做自己以前做的事.总是拿以前的眼光来看现在,导致了其实自己已经很low,但是还觉得自己很xxx. 好吧,最近开始PHP审计.jishigou!!!!!! */ 查看日志情况. show va ...
- hadoop单机and集群模式安装
最近在学习hadoop,第一步当然是亲手装一下hadoop了. 下面记录我hadoop安装的过程: 注意: 1,首先明确hadoop的安装是一个非常简单的过程,装hadoop的主要工作都在配置文件上, ...