1.Pig是基于hadoop的一个数据处理的框架。 MapReduce是使用java进行开发的,Pig有一套自己的数据处理语言,Pig的数据处理过程要转化为MR来运行。2.Pig的数据处理语言是数据流方式的,类似于初中做的数学题。3.Pig基本数据类型:int、long、float、double、....
分类:
其他好文 时间:
2015-03-17 19:48:54
阅读次数:
114
已知三角形重心到三边的距离和其中一边,求面积和重心到垂心的距离。计算几何。。纯数学题#include#includeint t;double x,y,z,a,s,d,r1,r2;int main(){ scanf("%d",&t); while(t--){ scanf("%...
分类:
其他好文 时间:
2015-03-16 16:00:49
阅读次数:
117
题意 : 给定整数数组 ai。求一个等差数列bi。 等差数列bi要能使∑(ai ? bi)2 最小的。输出 b1,d。两者可以是小数。
做法:推公式比较麻烦。步骤如下:
为方便计算 设 第零为b0,方差为d。 那么 bi=b0+i*d 。b1=b0+d。...
分类:
移动开发 时间:
2015-03-15 21:23:20
阅读次数:
197
http://acm.hdu.edu.cn/showproblem.php?pid=2076数学题。。。公式推出来就可以AC了。思路:分别求出时针和分针与12点的位置的夹角大小,输出夹角的差值,注意取小于180度的角。代码如下:#includeint main(){ int t; dou...
分类:
其他好文 时间:
2015-03-15 21:16:23
阅读次数:
159
Problem Description
Cowl is good at solving math problems. One day a friend asked him such a question: You are given a cube whose edge length is N, it is cut by the planes that was paralleled to its ...
分类:
其他好文 时间:
2015-03-14 11:02:15
阅读次数:
171
简单的数学题。要%1000007,开long long#includelong long n,ans;int t;int main(){ scanf("%d",&t); while(t--){ scanf("%lld",&n); ans=n*(n+1)/2*3...
分类:
其他好文 时间:
2015-03-14 10:58:40
阅读次数:
120
题意:一块镜子长宽是a*b。现在要调整(切割)成x:y的比例。问调整完的最大面积是多少。思路:先将x,y弄成最简比例,然后放大到不超过min(a,b)即可。代码:ll a,b,x,y;ll gcd(ll a,ll b){ if(b==0) ret a; ret gcd(b,a%b);}i...
分类:
其他好文 时间:
2015-03-11 16:39:18
阅读次数:
116
题意:传送门题目描述As you know, shadow95 is pretty good at maths, especially combinatorial mathematics. Now, he has made a problem for you. We call a subset wh...
分类:
其他好文 时间:
2015-03-10 21:24:27
阅读次数:
132
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4961Problem DescriptionNumber theory is interesting, while this problem is boring.Here is the problem. ...
分类:
其他好文 时间:
2015-03-10 19:18:19
阅读次数:
159