1〉 type 类型 选择项目符号用的不同样式 list-style-type : disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none | armenian |...
分类:
其他好文 时间:
2015-07-19 11:43:17
阅读次数:
113
sqrt(x) : https://leetcode.com/problems/sqrtx/Implement int sqrt(int x).
Compute and return the square root of x.解析:
容易想到的是用二分法去试,但收敛速度太慢,不能满足时间要求。
我们知道求根公式,牛顿迭代法 点击查看维基百科
首先,选择一个接近函数f(x)零点的x_0,计...
分类:
其他好文 时间:
2015-07-19 10:22:55
阅读次数:
166
Red and Black
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 25797
Accepted: 13967
Description
There is a rectangular room, covered with square tiles. Eac...
分类:
其他好文 时间:
2015-07-19 10:20:56
阅读次数:
132
Ohana Cleans UpDescriptionOhana Matsumae is trying to clean a room, which is divided up into annbyngrid of squares. Each square is initially either cl...
分类:
其他好文 时间:
2015-07-18 10:53:19
阅读次数:
88
题目:
Implement int sqrt(int x).
Compute and return the square root of x.
题意:
实现开方函数。
算法分析:
这种数学运算的题目,刚开始第一遍刷的时候说实话我都是作弊AC的。之后好多前辈的博客说到这种题目面试其实很常见的,建议还是好好的想一下。
参考了http://pisxw.com/a...
分类:
编程语言 时间:
2015-07-17 18:48:31
阅读次数:
144
Consider some square matrixAwith sidenconsisting of zeros and ones. There arenrows numbered from1tonfrom top to bottom andncolumns numbered from1tonfr...
分类:
其他好文 时间:
2015-07-17 17:33:36
阅读次数:
102
Painter's ProblemTime Limit:1000MSMemory Limit:10000KTotal Submissions:4912Accepted:2385DescriptionThere is a square wall which is made of n*n small s...
分类:
其他好文 时间:
2015-07-17 00:22:52
阅读次数:
121
题目:
Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
For example,
Given n = 3,
You should return the following matrix:
[
[ 1, 2, 3 ],
[ 8, 9...
分类:
编程语言 时间:
2015-07-15 22:54:53
阅读次数:
189
完全背包#include#include#include#includeusing namespace std;int A[20];int dp[305];int main(){ int i,j; for(i=1;i<=17;i++) A[i]=i*i; dp[0]=1; f...
分类:
其他好文 时间:
2015-07-15 20:38:44
阅读次数:
130