B-number
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2307 Accepted Submission(s): 1250
Problem Description
A wqb-number, or...
分类:
其他好文 时间:
2014-07-23 17:09:41
阅读次数:
157
Problem A: Tower of Cubes
In this problem you are given N colorful cubes each having a distinct weight. Each face of a cube is colored with one color. Your job is to build a tower using th...
分类:
其他好文 时间:
2014-07-23 17:07:51
阅读次数:
251
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1018解题报告:输入一个n,求n!有多少位。首先任意一个数 x 的位数 = (int)log10(x) + 1;所以n!的位数 = (int)log10(1*2*3*.......n) + 1;= (in...
分类:
其他好文 时间:
2014-07-23 16:24:11
阅读次数:
196
转型函数Number()可以用于任何数据类型,而另两个函数则专门用于把字符串转换成数值。这个3个函数对于同样的输入会有不同的结果。 Number()函数的转换规则如下: 如果是Boolean值,true和false将分别被转换为1和0 如果是是数字值,只是简单的传入和返回 如果是null...
分类:
其他好文 时间:
2014-07-23 16:22:31
阅读次数:
207
原始题目例如以下,意为寻找数组和最大的子串,返回这个最大和就可以。Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, ...
分类:
其他好文 时间:
2014-07-23 15:45:59
阅读次数:
246
1. 变量提升: 只对var声明的变量有效。 2. 标识符:数字,下划线,unicode字母,数字不能开头。 3. switch与case的值比较使用严格相等=== 4.do{}while(); 记住加分号。 5. 标签top: 使用break top; 跳到标签 6.数据类型number,stri...
分类:
编程语言 时间:
2014-07-23 15:05:56
阅读次数:
208
关于什么是梯度下降,请看我之前发的一个博文:http://blog.csdn.net/lilyth_lilyth/article/details/8973972
梯度下降能帮助我们找到局部最优值,取得很小的损失,但是在数据量达到数十万时,迭代次数高,运算速度慢,十分不适合。这时候可以考虑使用随机梯度下降算法。
所谓随机梯度下降是 每次用 每个样本的损失函数(即样本数为1时的损失函数)对th...
分类:
其他好文 时间:
2014-07-23 13:39:56
阅读次数:
256
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig...
分类:
其他好文 时间:
2014-07-23 12:36:06
阅读次数:
209
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:
其他好文 时间:
2014-07-23 12:03:26
阅读次数:
287
给一个数组,求区间[l,r]中第k大的数。今天被各种数据结构虐爆了,自己还是需要学习一下函数式线段树的,这个东西好像还挺常用。函数式线段树的思想是这样的,对于每个时间状态,我们都建立一颗线段树,查询两个状态在某个区间的差的话,我们只要找到两个状态分别对应的点相减即可。由于每次我使用线段树更新的时候,...
分类:
其他好文 时间:
2014-07-23 11:47:06
阅读次数:
241