UVALive 6262 Darts
Description
Consider a game in which darts are thrown at a board. The board is formed by 10 circles with radii 20, 40, 60, 80, 100, 120, 140, 160, 180, and 200 (measured in millimeters), centered at the origin. Each throw is evaluated depending on where the dart hits the board. The score is p points (p {1, 2,..., 10}) if the smallest circle enclosing or passing through the hit point is the one with radius 20 . (11 - p). No points are awarded for a throw that misses the largest circle. Your task is to compute the total score of a series of n throws.
Input
The first line of the input contains the number of test cases T. The descriptions of the test cases follow:
Each test case starts with a line containing the number of throws n (1n106). Each of the next n lines contains two integers x and y (- 200x, y200) separated by a space -- the coordinates of the point hit by a throw.
Output
Print the answers to the test cases in the order in which they appear in the input. For each test case print a single line containing one integer -- the sum of the scores of all n throws.
Sample Input
1
5
32 -39
71 89
-60 80
0 0
196 89
Sample Output
29
#include<iostream>
#include<string.h>
#include<stdio.h>
#include<ctype.h>
#include<algorithm>
#include<stack>
#include<queue>
#include<set>
#include<math.h>
#include<vector>
#include<map>
#include<deque>
#include<list>
using namespace std;
int d(int a,int b)
{
if(*<(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
if(*<(pow(a,)+pow(b,))&&(pow(a,)+pow(b,)))
return ;
return ;
}
int main()
{
int n;
cin>>n;
while(n--)
{
int m,ans=;
cin>>m;
while(m--)
{
int a,b;
scanf("%d%d",&a,&b);
ans+=d(a,b);
}
printf("%d\n",ans);
}
return ;
}
UVALive 6262 Darts的更多相关文章
- UVALive - 4108 SKYLINE[线段树]
UVALive - 4108 SKYLINE Time Limit: 3000MS 64bit IO Format: %lld & %llu Submit Status uDebug ...
- UVALive - 3942 Remember the Word[树状数组]
UVALive - 3942 Remember the Word A potentiometer, or potmeter for short, is an electronic device wit ...
- UVALive - 3942 Remember the Word[Trie DP]
UVALive - 3942 Remember the Word Neal is very curious about combinatorial problems, and now here com ...
- 日本DARTS 支撑的一系列应用项目
DARTS是多学科空间科学数据平台,例如天体物理.太阳物理.太阳物理.月球与行星科学和微重力科学.在此数据支撑下,有许多应用. 1.http://wms.selene.darts.isas.jaxa. ...
- 思维 UVALive 3708 Graveyard
题目传送门 /* 题意:本来有n个雕塑,等间距的分布在圆周上,现在多了m个雕塑,问一共要移动多少距离: 思维题:认为一个雕塑不动,视为坐标0,其他点向最近的点移动,四舍五入判断,比例最后乘会10000 ...
- UVALive 6145 Version Controlled IDE(可持久化treap、rope)
题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_ ...
- UVALive 6508 Permutation Graphs
Permutation Graphs Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit ...
- UVALive 6500 Boxes
Boxes Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Pract ...
- UVALive 6948 Jokewithpermutation dfs
题目链接:UVALive 6948 Jokewithpermutation 题意:给一串数字序列,没有空格,拆成从1到N的连续数列. dfs. 可以计算出N的值,也可以直接检验当前数组是否合法. # ...
随机推荐
- Apple Notification Center Service--ANCS【转】
Apple Notification Center Service 转自:http://studentdeng.github.io/blog/2014/03/22/ancs/ MAR 22ND, 20 ...
- 一、springcloud服务注册、发现、调用(consul/eureka)
1.Spring Cloud简介 Spring Cloud是一个基于Spring Boot实现的云应用开发工具,它为基于JVM的云应用开发中的配置管理.服务发现.断路器.智能路由.微代理.控制总线.全 ...
- tf.metrics.accuracy ==>坑货
tf.metrics.accuracy输出两个值,第一个值为上几步的平均精度,第二值是上几步与该步的精度的平均值. 正常的计算单个batch正确率的代码 self.correct_prediction ...
- URL的井号
2010年9月,twitter改版. 一个显著变化,就是URL加入了"#!"符号.比如,改版前的用户主页网址为 http://twitter.com/username 改版后,就变 ...
- kickstart配置LINUX无人值守选项--rootpw
linux kickstart rootpw密码可以使用明文,也可以使用加密过的值(密码为:IPPBXADMINROOT) 注意:在这里要使用加密过的值,否则安全性就太低了 rootpw --iscr ...
- CTF常用python库PwnTools的使用学习
之前主要是使用zio库,对pwntools的了解仅限于DynELF,以为zio就可以取代pwntools.后来发现pwntools有很多的高级用法都不曾听说过,这次学习一下用法,希望可以在以后的exp ...
- javascript 去除最后一个字符自定义的方法
//公共去除最后字符方法 function dtrim(str, s){ var reg = eval("/"+s+"$/gi"); str=str.repla ...
- CentOS7.5安装cairo-dock,比mac托盘还美
1.下载安装nux-desktop 到http://li.nux.ro/download/nux/dextop/el7/x86_64/找到nux-dextop-release-xxxx.nux.noa ...
- poj1979 Red And Black(DFS)
题目链接 http://poj.org/problem?id=1979 思路 floodfill问题,使用dfs解决 代码 #include <iostream> #include < ...
- 码云Android项目构建注意事项(转载)
1.ant项目 build.xml必须位于项目根目录. 2.maven项目 pom.xml必须位于项目根目录. 3.gradle项目 由于gradle的配置灵活,我们做了一些规范,并且增加了一下机制来 ...