hdu2080-2081
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的更多相关文章
- BZOJ 2081: [Poi2010]Beads
Description 问把n截成每个长度后不同子串个数. Sol 调和极数+Hash. 首先这是一个式子 \(n\sum_{i=1}^n \frac {1}{i}\) . 这东西就是调和极数再乘上 ...
- bzoj 2081 [Poi2010]Beads hash+调和级数
2081: [Poi2010]Beads Time Limit: 10 Sec Memory Limit: 259 MBSubmit: 1003 Solved: 334[Submit][Statu ...
- POJ 2081 Recaman's Sequence
Recaman's Sequence Time Limit: 3000ms Memory Limit: 60000KB This problem will be judged on PKU. Orig ...
- hdu 2081
PS:...找到好多水题.... #include "stdio.h" int main(){ ]; int i,j,n,N; scanf("%d",& ...
- POJ 2081
#include <iostream> #define MAXN 500005 using namespace std; //unsigned _m[MAXN]; ]; int main( ...
- Poj 2081 Recaman's Sequence之解题报告
...
- poj 2081 Recaman's Sequence
開始还以为暴力做不出来,须要找规律,找了半天找不出来.原来直接暴力.. 代码例如以下: #include<stdio.h> int a[1000050]; int b[100000000] ...
- HDOJ 2081 手机短号
Problem Description 大家都知道,手机号是一个11位长的数字串,同时,作为学生,还可以申请加入校园网,如果加入成功,你将另外拥有一个短号.假设所有的短号都是是 6+手机号的后5位,比 ...
- POJ 2081 Recaman's Sequence(水的问题)
[简要题意]:这个主题是很短的叙述性说明.挺easy. 不重复. [分析]:只需要加一个判断这个数是否可以是一个数组,这个数组的范围. // 3388K 0Ms #include<iostrea ...
- hdoj:2081
手机短号 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
随机推荐
- 读CSV转换datatable
using System.Data; using System.IO; /// <summary> /// Stream读取.csv文件 /// </summary> // ...
- English trip -- Phonics 4 元音字母 i
IPA 国际音标(英语:International Phonetic Alphabet [ælfəbet],缩写:IPA),早期又称万国音标 VOWELS [ɪ] [u] [ʌ] [ɒ ...
- 『TensorFlow』通过代码理解gan网络_中
『cs231n』通过代码理解gan网络&tensorflow共享变量机制_上 上篇是一个尝试生成minist手写体数据的简单GAN网络,之前有介绍过,图片维度是28*28*1,生成器的上采样使 ...
- UVA-1533 Moving Pegs (路径寻找问题)
Description Venture MFG Company, Inc. has made a game board. This game board has 15 holes and thes ...
- ASP.NET网页生命周期事件
网页事件 典型的使用方式 PreInit PreInit事件是网页生命周期中非常早起的一个事件,在PreInit事件触发之后,就会加载用户设置信息与网页主题.我们通常使用PreInit事件来执行下列处 ...
- arc路径例子-磊哥
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head> & ...
- javassist示例
javassist的作用是动态生成字节码. package com.zhang; class Fighter {} public class Assist_Test { public static v ...
- jsp config设置jsp页面
jsp-config jsp-config功能:用于设定jsp页面的相关设置(web.xml 版本在2.4之后) 常用的设置包括 taglib和jsp-property-group两个子元素.其中ta ...
- Openwrt WiFi Configure(1)
1 Scope of Document This document describes how to custom wifi option 2 Requiremen 2.1 ...
- CSRmesh Application
1.CSRmesh Control Application v2.0.1版本可以运行在支持BLE4.0的Android设备上,该版本在Android4.4.4.5.0.5.0.1.5.0.2.5.1和 ...