首页 > 其他 > 详细

1795. Table tennis

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

#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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!