由买买提看人间百态

topics

全部话题 - 话题: genpass
(共0页)
h*****9
发帖数: 26
1
来自主题: JobHunting版 - 一道关于电话pad的面试题
next = {1:[2,4,5],2:[1,3,4,5,6],3:[2,5,6],4:[1,2,5,7,8],5:[1,2,3,4,6,7,8,9],
6:[2,3,5,8,9],
7:[4,5,8],8:[4,5,6,7,9],9:[5,6,8]}
def genpass(now):
if not now: return 0
ret = 1
for n in next[now[-1]]:
if n in now: continue
ret += genpass(now+[n])
return ret
for i in range(1,10):
print i,genpass([i])
S**I
发帖数: 15689
2
来自主题: JobHunting版 - [合集] 一道关于电话pad的面试题
☆─────────────────────────────────────☆
pore (坚持不懈) 于 (Tue May 15 00:11:28 2012, 美东) 提到:
利用电话按键1-9产生password,必须swipe产生password,跟android很像,密码没有
重复的数字。
比如
1 2 3
4 5 6
7 8 9
可以从1出发到5,到9,到6, 到3, 产生密码15963.
但是不可以从1直接到9,因为1跟9不相连。
也不可以是1421,因为任何数字在一个密码中只能用一次。
问题是:用这种方法一共可以产生多少个passwords?
如果是nxn square,能够有多少个swipable的按键组合?
☆─────────────────────────────────────☆
tradertobe (builder) 于 (Tue May 15 00:24:00 2012, 美东) 提到:
Look like DFS.
☆─────────────────────────────────────☆
realife (leda) 于 ... 阅读全帖
h******n
发帖数: 233
3
来自主题: Golf版 - 《高尔夫N年》征文
这是几年前在toastmaster 的一个作业, 今天看见征文,来骗包子:-)
The topic I’m going to speak about today is, “Why do I play golf?”
When people ask me about my hobby, I say it’s GOLF. Mark Twain once said,
“Golf is a good walk spoiled.”
So why do I play?
Before I began playing golf about 10 years ago, like many others, I thought
golf was a slow, boring sport about as fun as watching paint dry. In
college, I worked at a restaurant which had the golf channel on the TV all
the time. Every golf scene looked the same to us ... 阅读全帖
z**c
发帖数: 7595
4
来自主题: WaterWorld版 - (ZT)赶快给老方签个名。
看看当年:
(以下是新语丝公开资料。 如有冒犯,敬请原谅)
巴义芳,建筑师,加拿大,多伦多
曹涵,博士, 美国Bionanomatrix公司CTO
曹化哲,金融硕士及MBA,普天寿公司杰出地产经纪
曹焕,工程师,泉州市鲤城黄石机械有限公司外贸经理
Cao Linqiu,博士,Research Scientist,荷兰DMV International
曹乾,博士,副教授,东南大学医疗保险系
曹兴龙,法律硕士,民商法学博士生,律师,浙江西子律师事务所
曹耀月,国电南京自动化股份有限公司
曹子谊,教授,山东师范大学生命科学学院
蔡卫,计算机工程与工程技术硕士,美国北德克萨斯大学工程学院
Chan Jane, 博士, Sr. Analyst, US West Financial
Chen Biao, 生物医学工程博士, Principal Scientist, Hologic, Inc.
陈昌和,硕士,福建省交通厅
陈大兵,博士研究生,美国明尼苏达大学
Chen Dong, 博士,Senior Staff Scientist, Veeco Instruments
Chen Guangjion... 阅读全帖
(共0页)