题目:Given an integer N, and how many pairs (A;B) are there such that: gcd(A;B) = A xor B where 1=2)是不同位数的。和同学讨论后得出如下证明:设最大公约数为 j, 假设这两个数是b 和 b+k*j,(k>....
分类:
其他好文 时间:
2014-08-19 23:50:55
阅读次数:
233
Eddy's AC难题
Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3710 Accepted Submission(s): 1741
Problem Description
Eddy是个ACMer,...
分类:
其他好文 时间:
2014-08-19 20:52:25
阅读次数:
237
//给既定文本框按规则付不同的值[引申]-10: -20: -100: -100: Math//给既定文本框按规则付不同的值[引申]-10: -20: -100: -100: Math
分类:
Web程序 时间:
2014-08-19 09:21:03
阅读次数:
260
Oracle中获取刚刚插入记录的主键值: <insert?id="insertSelective"?parameterType="com.jxxx.p2pp.model.UUserInfo">
????<selectKey?resultType="java.math.BigDecimal"?order="BEFORE"?keyProperty="...
分类:
其他好文 时间:
2014-08-18 22:13:03
阅读次数:
234
题目链接:uva 1397 - The Teacher's Side of Math
题目大意:给出一个方程的解x=a1/m+b1/n,求原方程(给出系数即可)
解题思路:因为方程肯定等于0,所以对于各个系数ax/mby/n都会等于0,于是可以根据这个列出方程,注意最高项的系数始终为1.
#include
#include
#include
#include
using n...
分类:
其他好文 时间:
2014-08-18 22:09:13
阅读次数:
403
math.h常用函数
int abs (int x);
double acos (double x);
double asin (double x);
double atan (double x);
double atan2 (double y, double x);
double atof (const char *s);
double ceil (do...
分类:
编程语言 时间:
2014-08-18 18:42:12
阅读次数:
296
街区最短路径问题
时间限制:3000 ms | 内存限制:65535 KB
难度:4
描述
一个街区有很多住户,街区的街道只能为东西、南北两种方向。
住户只可以沿着街道行走。
各个街道之间的间隔相等。
用(x,y)来表示住户坐在的街区。
例如(4,20),表示用户在东西方向第4个街道,南北方向第20个街道。
现在要建一个邮局,使得各个...
分类:
其他好文 时间:
2014-08-18 16:30:02
阅读次数:
161
1. mapvar ary = Array(3);ary[0] = 2ary.map(function(elem) { return '1'; });结果是["1", undefined * 2], 因为map只能被初始化过的数组成员调用2. reduce[].reduce(Math.pow); ....
分类:
编程语言 时间:
2014-08-18 15:57:52
阅读次数:
185
题目链接You are given an arrayAof sizeN. You are asked to answerQqueries.Each query is of the form :i j xYou need to printYesifxdivides the value returned...
分类:
其他好文 时间:
2014-08-17 14:15:32
阅读次数:
239
在Java,Python中,可以用import的方式来进行脚本或模块之间调用,例如:
>>> import math
>>> math.sqrt(4)
2.0
在Shell中要如何调用别的shell脚本,或别的脚本中的变量,函数呢?
方法一:
. ./subscript.sh
方法二:
source ./subscript.sh
注意:
两个点之间,有空格,千万注意.
两个脚本不在同一目录,要用绝对路径
例如:
main.sh #主脚本
subcripts.sh ...
分类:
其他好文 时间:
2014-08-16 12:34:40
阅读次数:
176