hdu2080

计算两点关于原点夹角,数学

 #include<stdio.h>
#include<math.h>
double len(double x1,double y1,double x2,double y2){
return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
}
int main(){
int T;
while(scanf("%d",&T)!=EOF){
for(int q=;q<=T;q++){
double x1,y1,x2,y2;
double a,b,c;
scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
a=len(,,x1,y1);
b=len(,,x2,y2);
c=len(x1,y1,x2,y2);
double cos1=(a*a+b*b-c*c)/(*a*b);
double t=acos(cos1)*/3.14159;
printf("%.2lf\n",t);
}
}
return ;
}

hdu2081

模拟

 #include<stdio.h>

 int main(){
int N;
while(scanf("%d",&N)!=EOF){
for(int q=;q<=N;q++){
char a[];
scanf("%s",a);
printf("");
for(int i=;i<=;i++)printf("%c",a[i]);
printf("\n");
getchar();
}
}
return ;
}

hdu2080-2081的更多相关文章

  1. BZOJ 2081: [Poi2010]Beads

    Description 问把n截成每个长度后不同子串个数. Sol 调和极数+Hash. 首先这是一个式子 \(n\sum_{i=1}^n \frac {1}{i}\) . 这东西就是调和极数再乘上 ...

  2. bzoj 2081 [Poi2010]Beads hash+调和级数

    2081: [Poi2010]Beads Time Limit: 10 Sec  Memory Limit: 259 MBSubmit: 1003  Solved: 334[Submit][Statu ...

  3. POJ 2081 Recaman's Sequence

    Recaman's Sequence Time Limit: 3000ms Memory Limit: 60000KB This problem will be judged on PKU. Orig ...

  4. hdu 2081

    PS:...找到好多水题.... #include "stdio.h" int main(){ ]; int i,j,n,N; scanf("%d",& ...

  5. POJ 2081

    #include <iostream> #define MAXN 500005 using namespace std; //unsigned _m[MAXN]; ]; int main( ...

  6. Poj 2081 Recaman's Sequence之解题报告

                                                                                                         ...

  7. poj 2081 Recaman&#39;s Sequence

    開始还以为暴力做不出来,须要找规律,找了半天找不出来.原来直接暴力.. 代码例如以下: #include<stdio.h> int a[1000050]; int b[100000000] ...

  8. HDOJ 2081 手机短号

    Problem Description 大家都知道,手机号是一个11位长的数字串,同时,作为学生,还可以申请加入校园网,如果加入成功,你将另外拥有一个短号.假设所有的短号都是是 6+手机号的后5位,比 ...

  9. POJ 2081 Recaman&#39;s Sequence(水的问题)

    [简要题意]:这个主题是很短的叙述性说明.挺easy. 不重复. [分析]:只需要加一个判断这个数是否可以是一个数组,这个数组的范围. // 3388K 0Ms #include<iostrea ...

  10. hdoj:2081

    手机短号 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submis ...

随机推荐

  1. Python - configParser模块学习

    configParser 模块用于操作配置文件 注:Parser汉译为“解析”之意. 配置文件的格式与windows ini文件类似,可以包含一个或多个节(section),每个节可以有多个参数(键= ...

  2. J2EE 与 Java EE

    J2EE(Java 2 Enterprise Edition)和Java EE是一样的,由于J2EE的名称容易引起误解,Sun将J2EE更名为Java EE. 2005年6月,JavaOne大会召开, ...

  3. nginx File not found 错误

    使用php-fpm解析PHP,"No input file specified","File not found"是令nginx新手头疼的常见错误,原因是php ...

  4. 20170714xlVba多个工作簿转多个Word文档表格

    Public Sub SameFolderGather() Application.ScreenUpdating = False Application.DisplayAlerts = False A ...

  5. Educational Codeforces Round 47 (Rated for Div. 2)G. Allowed Letters 网络流

    题意:给你一个字符串,和每个位置可能的字符(没有就可以放任意字符)要求一个排列使得每个位置的字符在可能的字符中,求字典序最小的那个 题解:很容易判断有没有解,建6个点表示从a-f,和源点连边,容量为原 ...

  6. Android studio的 repositories配置多个url

    buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2. ...

  7. zuul网关源码解析

    zuul网关源码解析 zuul请求的生命周期 ZuulServlet ZuulServlet定义了对zuul整个过程的处理,如下: public void service(javax.servlet. ...

  8. 数据库故障诊断(Troubleshooting)之性能问题导致的数据库严重故障案例之一

    好久不来这里写东西,今天有点时间,来这里写点最近遇到的事情.前段时间,某电信业务用户因某核心生产库最近多次宕机重启,多方人员介入无果后,给我发来了邮件,大概意思就是现在该问题已经造成了比较严重的后果, ...

  9. $digest already in progress 解决办法

    Solution In short, instead of doing this: ... your controller code... $http.get('some/url', function ...

  10. libxl 的使用,读取时间格式

    最近开发使用到 libxl,用的是3.8.0 破解版. 具体过程: 1.将lib.dll放在exe同目录下,在代码中引用 libxl.lib #pragma comment(lib, ".\ ...