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 ...
随机推荐
- Mysql中将日期转化为毫秒
一:将毫秒值转化为指定日期格式 使用MYSQL自带的函数FROM_UNIXTIME(unix_timestamp,format). 举例: select FROM_UNIXTIME(136417651 ...
- html和css基础
背景: 最近公司开发BS架构的项目,公司主要业务也不是做BS开发的,没有项目经理,没有美工,没有前端,界面丑的不要不要的,哈哈哈 然后咧,使用asp.net用着用着,技术老大觉得界面怎么可以这么丑,不 ...
- 开发《基于Arcgis Online的家政管理服务信息系统》随笔1
1.在webservice中写的方法参数里面含有数组,如:public DataTable AdvSearch1(int ServiceArea, params string[] nas), 在发布之 ...
- information_schema系列之字符集校验(CHARACTER_SETS,COLLATIONS,COLLATION_CHARACTER_SET_APPLICABILITY)
1:CHARACTER_SETS 首先看一下查询前十条的结果: root@localhost [information_schema]>select * from CHARACTER_SETS ...
- 有关于eclipse启动不了的问题
!SESSION 2016-06-16 10:43:16.368 -----------------------------------------------eclipse.buildId=4.5. ...
- Quartus 的管脚分配
与管脚分配相关的一些功能在assignments菜单下, Remove assignments... Back-Annotate Assignment... Import Assignment... ...
- Remoting创建远程对象的一个实例:
private static Lazy<IChannelManager> channelManager=new Lazy<IChannelManager>(() => ...
- 简单的python服务器程序
一个接受telnet输入的服务器端小程序 #!/usr/local/bin/python3.5 #coding:utf-8 import socket host = '' port = 51423 s ...
- DataGridView 控件详细解说
1. DataGridView 控件详细解说:http://blog.csdn.net/qq_24304137/article/details/51068768 2. DataGridView的几个基 ...
- MJExtension 中model嵌套Model
+ (NSDictionary *)objectClassInArray { return @{@"comment": [Comment class]};}