摘要: Public nRows As Long, nCols As Long, nLastRow As Long, tmpSum As Long, tmpRow As Long, r As Long, c As Long Public sumRows() As Long, nRowSkipSum() As 阅读全文
posted @ 2022-11-29 09:00 依云科技 阅读(23) 评论(0) 推荐(0)
摘要: Public nRows As Long, nCols As Long, nLastRow As Long, tmpSum As Long, tmpRow As Long, r As Long, c As Long Public sumRows() As Long, nRowSkipSum() As 阅读全文
posted @ 2022-11-28 09:54 依云科技 阅读(25) 评论(0) 推荐(0)
摘要: Sub 限行列和随机加墙版() Dim nRows As Long, nCols As Long, nLastRow As Long, tmpSum As Long, tmpRow As Long, r As Long, c As Long Dim sumRows() As Long, nRowSk 阅读全文
posted @ 2022-11-27 16:11 依云科技 阅读(20) 评论(0) 推荐(0)
摘要: Sub 限行列和随机() Dim vArr() As Variant vArr = Range("A2").CurrentRegion.Value rndArrLmtSumLng2D vArr Range("A1").Resize(UBound(vArr), UBound(vArr, 2)).Val 阅读全文
posted @ 2022-11-27 16:11 依云科技 阅读(44) 评论(0) 推荐(0)
摘要: Public dic As Object, dic_工资求和 As Object, dic_已交税额 As Object, dic_项目信息 As Object Public ar_res, ar_src Sub main() 清空 获取原始数据_身份证号码和姓名 受雇日期和人员状态写入字典 在结果 阅读全文
posted @ 2022-11-24 11:00 依云科技 阅读(56) 评论(0) 推荐(0)
摘要: Sub 二分查找() nums = Array(-1, 0, 3, 5, 9, 12) target = 12 Debug.Print (search(nums, target)) End Sub Public Function search(nums, target) If target < nu 阅读全文
posted @ 2022-11-23 10:31 依云科技 阅读(17) 评论(0) 推荐(0)
摘要: 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)