上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: 题目: class Solution { public: vector<int> constructArr(vector<int>& a) { int len = a.size(); if(len==0) return {}; vector<int> b(len, 1); for(int i=1;i 阅读全文
posted @ 2023-08-31 20:45 孜孜不倦fly 阅读(17) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230830213756753-635102402.png) ``` class Solution { public: int singleNumber(vector& 阅读全文
posted @ 2023-08-30 21:40 孜孜不倦fly 阅读(9) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230830205030351-137600179.png) ``` class Solution { public: vector singleNumbers(vec 阅读全文
posted @ 2023-08-30 20:52 孜孜不倦fly 阅读(9) 评论(0) 推荐(0)
摘要: 报错信息: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o: in function _start': (.text+0x24): undefined reference to main' 阅读全文
posted @ 2023-08-30 10:44 孜孜不倦fly 阅读(31) 评论(0) 推荐(0)
摘要: 题目: class Solution { public: vector<double> dicesProbability(int n) { vector<double> dp(6, 1.0/6.0); //dp[j]表示和为j时的概率,这里j=6是因为这是第一个骰子,骰子增多j也会改变 for(in 阅读全文
posted @ 2023-08-29 22:20 孜孜不倦fly 阅读(14) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230829204958404-177212521.png) ``` class Solution { public: int nthUglyNumber(int n) 阅读全文
posted @ 2023-08-29 21:00 孜孜不倦fly 阅读(12) 评论(0) 推荐(0)
摘要: 题目: class Solution { public: bool isMatch(string s, string p) { int m = s.size()+1, n = p.size()+1; vector<vector<bool>> dp(m, vector<bool>(n, false)) 阅读全文
posted @ 2023-08-28 22:57 孜孜不倦fly 阅读(14) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230828214159429-355812566.png) ``` class Solution { public: int numWays(int n) { vec 阅读全文
posted @ 2023-08-28 21:42 孜孜不倦fly 阅读(25) 评论(0) 推荐(0)
摘要: **1.tensor转np** ``` # 创建一个形状为[2, 2, 40, 256]的随机张量 torch_tensor = torch.rand(2, 2, 40, 256) # 将tensor转换为NumPy数组 numpy_array = torch_tensor.numpy() ``` 阅读全文
posted @ 2023-08-28 16:25 孜孜不倦fly 阅读(29) 评论(0) 推荐(0)
摘要: 题目: ![](https://img2023.cnblogs.com/blog/2679751/202308/2679751-20230827203453610-1403573288.png) ``` class Solution { public: bool isStraight(vector& 阅读全文
posted @ 2023-08-27 20:44 孜孜不倦fly 阅读(14) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页