1 #include<iostream> 2 #include<cmath> 3 using namespace std; 4 int main(){ 5 int n; 6 cin>>n; 7 while(n--){ 8 int t; 9 cin>>t; 10 int points=0; 11 while(t--){ 12 int a,b; 13 cin>>a>>b; 14 if((a>10&&a<50)&&(b>10&&b<50)){ 15 if(pow(a-30,2)+pow(b-30,2)<400) 16 points+=1; 17 } 18 if((a>90&&a<110)&&b>20&&b<40) { 19 if(pow(a-100,2)+pow(b-30,2)<100) points+=2; 20 } 21 if((a>165&&a<175)&&b>25&&b<35){ 22 if(pow(a-170,2)+pow(b-30,2)<25) points+=3; 23 } 24 } 25 cout<<points<<endl; 26 } 27 return 0; 28 }
本知识属于个人知识成果,如需转载,请邮件请求