摘要:
Sub 摆动序列() 'Dim nums(0 To 6) nums = Array(1, 17, 5, 10, 13, 15, 10, 5, 16, 8) ' nums = Array(1, 2, 3, 4, 5, 6, 7, 8, 9) ' nums = Array(1, 7, 4, 9, 2, 阅读全文
posted @ 2022-11-22 15:18
依云科技
阅读(16)
评论(0)
推荐(0)
摘要:
Sub 贪心算法_分发饼干() g = Array(1, 2) s = Array(1, 2, 3) Debug.Print (findContectChildren(g, s)) Debug.Print (findContentChilren(g, s)) End Sub Function fin 阅读全文
posted @ 2022-11-22 14:43
依云科技
阅读(40)
评论(0)
推荐(0)
摘要:
Sub 身份证() With Me .Range("f:f").NumberFormatLocal = "@" lastRow = .Cells(.Rows.Count, 1).End(xlUp).Row For x = 2 To lastRow ' If x = 43 Then Stop s = 阅读全文
posted @ 2022-11-22 13:46
依云科技
阅读(249)
评论(0)
推荐(0)
摘要:
Sub combinationSum() ar = Array(1, 2, 3) target = 4 Dim dp() ReDim dp(target + 1) dp(0) = 1 For i = 0 To target For j = 0 To UBound(ar) If i >= ar(j) 阅读全文
posted @ 2022-11-22 13:46
依云科技
阅读(16)
评论(0)
推荐(0)
摘要:
Public fp$, obmapp As Object Sub kk() 文件夹浏览器 Application.ScreenUpdating = False Set fso = CreateObject("scripting.filesystemobject") If fp = "" Then E 阅读全文
posted @ 2022-11-22 11:21
依云科技
阅读(321)
评论(0)
推荐(0)
摘要:
Sub test() For i = 1 To 20 Debug.Print f(50, 10, 30, 3, 2) Next End Sub Rem sum_target 目标总和 Rem low 下限 Rem high 上限 Rem count_comb 组合个数 Rem decimal_dig 阅读全文
posted @ 2022-11-22 08:55
依云科技
阅读(56)
评论(0)
推荐(0)
摘要:
Sub test() tms = Timer h = [e2] '目标和值h g = [g2] '凑数计算精度g 即Round函数的第2参数位数指定 m = [a1].End(4).Row - 1 '有效元素个数m ar = [a2].Resize(m, 2) For i = 1 To m ar(i 阅读全文
posted @ 2022-11-22 08:52
依云科技
阅读(83)
评论(0)
推荐(0)