和三个柱子的最初的汉诺塔很类似,只是多了一个柱子,相当于缓存区大了一些,处理的速度自然快了一些。 粗略的C代码(并没有使先移动到第四根柱子上面的圆盘的数量是最优): #include <stdio.h> int count = 0; void hanoi (char s, char t1, char ...
分类:
其他好文 时间:
2020-09-17 20:42:51
阅读次数:
51
Problem LeetCode Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where t ...
分类:
编程语言 时间:
2020-09-17 20:29:16
阅读次数:
30
目前,车联网经历着前所未有的快速发展,数据量呈现爆发式增长,合理选择数据传输方式和有效评估数据传输性能成为了研究的热点。专用短程通信技术(Dedicated Short-Range Communications,DSRC)作为车联网中的无线通信技术,提供了车与车(Vehicle-to-vehicle ...
分类:
其他好文 时间:
2020-09-17 19:37:54
阅读次数:
26
2. 两数相加 这题medium,但思路挺简单的。模拟下就可以 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), ...
分类:
其他好文 时间:
2020-09-17 19:08:34
阅读次数:
21
题目描述: This is the first problem for test. Since all we know the ASCII code, your job is simple: Input numbers and output corresponding messages. 输入: T ...
分类:
其他好文 时间:
2020-09-17 17:23:30
阅读次数:
51
''' 斗地主:v1.0 ''' import random def creat_poker(): # 扑克9种:2-10 poker_num = [str(i) for i in range(2, 11)] # 剩下的4种 poker_str = ['A', 'J', 'Q', 'K'] # 2个 ...
分类:
编程语言 时间:
2020-09-17 17:07:42
阅读次数:
27
#重复列表按重复次数排序方法1s = 'aacbddbcdadb'lists1=list(s)uniques1 = set(lists1)dict_str = {}for unique1 in uniques1: i=0 for list1 in lists1: if list1 == unique ...
分类:
编程语言 时间:
2020-09-17 16:44:45
阅读次数:
37
1、指定单元格在工作表位置 下例:指定A10单元格位于左上角 Sub 指定单元格至左上角() ActiveWindow.ScrollColumn = Range("a10").Column ActiveWindow.ScrollRow = Range("a10").Row End Sub ...
分类:
编程语言 时间:
2020-09-17 16:39:06
阅读次数:
34
#方案一:# result=0# #列# for i in range(1,10):# #行# for j in range(1,i+1):# result=i*j# print('%d*%d=%d'%(i,j,result),end=' ')# print()#方案二:通过【for..in..】方 ...
分类:
编程语言 时间:
2020-09-17 16:38:32
阅读次数:
26
importrandomnumArray=[]numStr=[]unite=[‘‘,‘十‘,‘百‘,‘千‘,‘万‘,‘十‘,‘百‘,‘千‘,‘亿‘,‘十‘]jici=1foriteminrange(0,10):numArray.append
分类:
其他好文 时间:
2020-09-17 16:30:32
阅读次数:
17