摘要:
conda update pytorch torchvision 阅读全文
摘要:
dogdistance = {'dog-dog': 33, 'dog-cat': 36, 'dog-car': 41, 'dog-bird': 42} min(dogdistance, key=dogdistance.get) 返回最小值的键值: 'dog-dog' max(dogdistance, 阅读全文
摘要:
HMM 模型 HMM(隐马尔科夫模型)有 两类变量:(变量序列) 1. Hidden States:xi 2. Events:ei 模型的三要素: 1. State priors 2. Transition matrix 3. Emission matrix 三种求解问题: 1. 已知 模型三要素 阅读全文
摘要:
equals 比较两个对象的值是否相等 == 比较是否为同一个对象 阅读全文
摘要:
这题思路一开始想错了,主要体现在两方面: 1. 不应该针对每个点搜索,而是应该逆推回来,从河流到岸上进行搜索 阅读全文
摘要:
Question In an N by N square grid, each cell is either empty (0) or blocked (1). A clear path from top-left to bottom-right has length k if and only i 阅读全文
摘要:
Question Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents y 阅读全文
摘要:
主要函数 bisect.bisect_left(data, 4, lo=0, hi=len(a)) # 在data找到第一个大于等于4的数的index(即插入4后左边数小于4,右边数大于等于4) bisect.bisect_right(data, 4) # 在data找到第一个大于4的数的index 阅读全文
摘要:
Question Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses. Now, you ar 阅读全文
摘要:
Question Given an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to compute 阅读全文