码迷,mamicode.com
首页 > 其他好文 > 详细

1795. Table tennis

时间:2016-10-22 14:49:05      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:nbsp   namespace   std   ace   int   #include   name   math   table   

#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

标签:nbsp   namespace   std   ace   int   #include   name   math   table   

原文地址:http://www.cnblogs.com/sysu-eeman-yang/p/5987460.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!