Implementint sqrt(int x).Compute and return the square root ofx.求平方根, 用的是二分法. 从 0 - x, 使用二分的思想啊~为了防止overflow, 把low和up用long。然后return int类型就行了~据说还有一种牛顿迭...
分类:
其他好文 时间:
2015-02-25 08:01:21
阅读次数:
143
//CodeForces 407A 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 int square[1010]; 7 s...
分类:
其他好文 时间:
2015-02-25 00:42:55
阅读次数:
261
上图是一个典型dmz网络拓扑pf1,需要在system->firewall/nat->networkaddresstranslation中,设置natreflectionmodeforportforwards模式为:PureNAT打开上述设置,可以让内网直接用域名访问架在dmz里的服务器。pf2,我是将连接dmz的端口设置为wan,接内网为lan,然后关闭..
分类:
其他好文 时间:
2015-02-24 13:57:58
阅读次数:
744
https://doc.pfsense.org/index.php/I_locked_myself_out_of_the_WebGUI,_help!登陆控制台,执行:#easyrulepasswantcpx.x.x.xy.y.y.y443xxxx是远程主机ip,yyyy是pfsense的wan端口ip(或lan端口ip)上述命令,会在最后面加规则,规则是优先匹配的,所以可能还是无法登陆可以先..
分类:
其他好文 时间:
2015-02-24 13:57:15
阅读次数:
184
Square
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9502 Accepted Submission(s): 3091
Problem Description
Given a set of sticks...
分类:
其他好文 时间:
2015-02-20 15:15:53
阅读次数:
180
描述:一个句子中也许有多个连续空格,过滤掉多余的空格,只留下一个空格。输入一行,一个字符串(长度不超过200),句子的头和尾都没有空格。输出过滤之后的句子。样例输入Hello world.This is c language.样例输出Hello world.This is c lan...
分类:
其他好文 时间:
2015-02-18 19:53:46
阅读次数:
348
Red and Black
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 24058
Accepted: 13007
Description
There is a rectangular room, covered with square tiles. E...
分类:
其他好文 时间:
2015-02-18 14:06:09
阅读次数:
133
练习1.40(未看懂题目意思)
首先根据公式x^3+ax^2+bx+c写出相应的cubic过程,它的返回值是一个接受参数x的过程:
(define (cubic a b c)
(lambda (x)
(+ (cube x)
(* a (square x))...
分类:
其他好文 时间:
2015-02-17 21:06:37
阅读次数:
174
SquaresTime Limit:3500MSMemory Limit:65536KTotal Submissions:16908Accepted:6425DescriptionA square is a 4-sided polygon whose sides have equal length ...
分类:
其他好文 时间:
2015-02-17 12:51:53
阅读次数:
191
Problem Description
Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is...
分类:
Web程序 时间:
2015-02-16 13:04:59
阅读次数:
188