A child is running up a staircase with n steps and can hop either 1 step, 2 steps, or 3 steps at a time. Implement a method to count how many possible ...
分类:
其他好文 时间:
2016-12-08 07:40:17
阅读次数:
167
作者:Yang Eninala链接:http://www.zhihu.com/question/23005815/answer/33971127来源:知乎著作权归作者所有,转载请联系作者获得授权。 根据我的理解,大多数人用汉密尔顿四元数就只是做三维空间的旋转变换(我反正没见过其他用法)。那么你不用学 ...
分类:
其他好文 时间:
2016-11-01 11:31:27
阅读次数:
853
本题来自 Project Euler 第9题:https://projecteuler.net/problem=9 这题若是想清楚了,其实是相当简单,无非是找出各种 a+b+c=1000 的组合,然后验证 a**2 + b**2 = c**2 就行了。遍历范围方面,因为 a<b<c,最小的 a 最大 ...
分类:
编程语言 时间:
2016-10-29 14:16:26
阅读次数:
207
//顺序 typedef struct { int row, col; //非零元素的行号、列号 ElemType val; //元素值}Triple;typedef struct { int m, n, t; //矩阵的行、列数及非零元素个数 Triple sm[MaxTerms + 1]; // ...
分类:
其他好文 时间:
2016-10-11 19:09:13
阅读次数:
183
题目大概说给n个数,从中选出三个数求和,问能到的各个和分别有几种取法能够得到? ...
分类:
其他好文 时间:
2016-09-02 23:09:10
阅读次数:
265
Triple Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 388 Accepted Submission(s): 148 Problem D ...
分类:
编程语言 时间:
2016-08-31 22:17:11
阅读次数:
195
常见加密算法 :
DES(Data Encryption Standard):数据加密标准,速度较快,适用于加密大量数据的场合;
3DES(Triple DES):是基于DES,对一块数据用三个不同...
分类:
编程语言 时间:
2016-08-27 12:58:02
阅读次数:
259
#!/usr/bin/env python#encoding=utf-8"""bdx"""def bdx_agent(x=500,y=100,lost=0,i=0): i=i+1 print "第%s轮:压%s,压triple:%s,赢1:%s 赢2:%s,lost:%s"%(i,x,y,x*2-y... ...
分类:
其他好文 时间:
2016-08-23 09:06:45
阅读次数:
318
>>> dox()第1轮:压500,压triple:100,赢1:400 赢2:1800,lost:-600lost: -600第2轮:压1000,压triple:200,赢1:200 赢2:3000,lost:-1800lost: -1800第3轮:压2000,压triple:300,赢1:-10... ...
分类:
其他好文 时间:
2016-08-23 09:04:52
阅读次数:
185
Description Katya studies in a fifth grade. Recently her class studied right triangles and the Pythagorean theorem. It appeared, that there are triple ...
分类:
其他好文 时间:
2016-08-22 00:13:01
阅读次数:
220