classSolution(object):deffib(self, n):""":type n: int:rtype: int"""if n ==0:return0dp =[0]*(n+1)dp[0]=0dp[1]=1for i inrange(2, n+1):dp[i]=dp[i-1]+dp[i-2]return dp[n]
70. 爬楼梯
题目链接:70. 爬楼梯
classSolution(object):defclimbStairs(self, n):""":type n: int:rtype: int"""dp=[0]*(n+1)if n ==1:return1dp[1]=1dp[2]=2for i inrange(3,n+1):dp[i]=dp[i-1]+dp[i-2]return dp[n]
746. 使用最小花费爬楼梯
题目链接:746. 使用最小花费爬楼梯
注意要爬到顶端(而不是cost的最后一个)
classSolution(object):defminCostClimbingStairs(self, cost):""":type cost: List[int]:rtype: int"""dp=[0]*(len(cost)+1)dp[0]=0dp[1]=0for i inrange(2,len(cost)+1):dp[i]=min(dp[i-1]+cost[i-1], dp[i-2]+cost[i-2])return dp[len(cost)]
问题
dg搭建后开库报错
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-10458: standby database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: /u01/app/oracle/oradat…
在autodl上部署大模型
windows运行太麻烦,环境是最大问题。
选择云上服务器【西北B区 / 514机】
cpp (c c plus plus)
纯 C/C 实现,无需外部依赖。针对使用 ARM NEON、Accelerate 和 Metal 框架的 Apple 芯片进行了优化。支持适用于 x86 架构的 AVX、…