码迷,mamicode.com
首页 >  
搜索关键字:square    ( 2122个结果
nyoj 587 blockhouses(DFS)
blockhouses 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 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...
分类:其他好文   时间:2015-04-21 09:54:39    阅读次数:147
css ie6盒子无内容问题
在实际工作中有时候元素前面需要带有小方块。虽然list-style: square;可以显示,但是大小不太好控制。所以选用div{width:2px;height:2px;background:#000;position:absolute;top:10px;left:-10px;} 但是ie6里面....
分类:Web程序   时间:2015-04-19 14:39:09    阅读次数:139
TED_Topic2:My desperate journey with a human smuggler
My desperate journey with a human smuggler By Barat Ali Batoor When I was a child there was a toy where you could put square, round, triangular and st...
分类:其他好文   时间:2015-04-19 12:56:45    阅读次数:225
HDU 1398-Square Coins (母函数)
【题目链接】click here~~ 【题目大意】题意:硬币面值为平方数,面值分别为1,4,9,16......289 (=17^2),让你求对于面值n,你用以上面值的硬币有多少种拼法。 【解题思路】:母函数,设 1个1元的钞票可以用函数1+x表示, 1个4元的钞票可以用函数1+x^4表示, 1个9元的钞票可以用函数1+x^9表示, 1个16元的钞票可以用函数1+x^16表示, ...
分类:其他好文   时间:2015-04-19 11:37:54    阅读次数:147
Codeforces534E:Berland Local Positioning System
In Berland a bus travels along the main street of the capital. The street begins from the main square and looks like a very long segment. There are n bus stops located along the street, the i-th of ...
分类:其他好文   时间:2015-04-18 20:38:14    阅读次数:196
Validate a sudo puzzle
这个解法告诉我们读题要精确,且例证了多维数组的重要性。# Sudoku [http://en.wikipedia.org/wiki/Sudoku]# A valid sudoku square satisfies these# two properties:# 1. Each column of.....
分类:其他好文   时间:2015-04-18 13:03:41    阅读次数:124
Sqrt(x)
Implementint sqrt(int x).Compute and return the square root ofx.1 class Solution {2 public:3 int mySqrt(int x) {4 return floor(sqrt(x*1.00...
分类:其他好文   时间:2015-04-18 11:28:43    阅读次数:104
leetcode之sqrt
Implement int sqrt(int x).Compute and return the square root of x.这道题也属于二分查找的变形主流的方法是用牛顿插值,牛顿法的思想参考http://blog.csdn.net/StarCXDJ/article/details/18051...
分类:其他好文   时间:2015-04-11 22:24:30    阅读次数:116
Sqrt(x) -- leetcode
Implement int sqrt(int x). Compute and return the square root of x. 此代码在leetcode上实际执行时间为16ms。 基本思路为二分法。 由于二段式二分法,退出循环时,有两种情况,一是精确匹配,二是精确值不存在情况下,指向稍大一点的。故函数返回时需要判断一下。 另外一点需要注意的是,作判断时,不能用 mid *...
分类:其他好文   时间:2015-04-08 15:03:08    阅读次数:106
leetcode || 69、Sqrt(x)
problem: Implement int sqrt(int x). Compute and return the square root of x. Hide Tags  Math Binary Search 题意:计算平方根,没有指定精度,默认精度为0.00001 thinking: (1)由于...
分类:其他好文   时间:2015-04-08 10:56:36    阅读次数:192
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!