会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Shedlon2
Keep Learning...
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2022年9月27日
LeetCode[2399. 检查相同字母间的距离]
摘要: 2399. 检查相同字母间的距离 class Solution { public: bool checkDistances(string s, vector<int>& distance) { vector<int> p[26];//首先我们定义一个vector类型的数组 for(int i = 0
阅读全文
posted @ 2022-09-27 18:39 Sheldon2
阅读(27)
评论(0)
推荐(0)
2022年9月26日
Pytorch教程[持续更新...]
摘要: PyTorch深度学习快速入门 前言 这是一个Pytorch的学习笔记,同时加入了一点个人理解。 写这个博客的初衷是为了让我更好的~~在课上摸鱼~~,复习 视频来自我是土堆 强烈推荐 ###Dataset类代码实战 这一步我们的主要数据是加载我们的数据集 步骤如下 重写Dataset类中的init和
阅读全文
posted @ 2022-09-26 23:19 Sheldon2
阅读(46)
评论(0)
推荐(0)
LeetCode[2409. 统计共同度过的日子数]
摘要: 2409. 统计共同度过的日子数 知识点1 区间求交问题,已知我们的区间1:[a,b],区间2:[c,d],那么区间1和区间2有交集部分的长度为多少呢? 我们有如下公式:max{0,min(b,d) - max(a,c) + 1} 知识点2 sscanf()函数 下面是 sscanf() 函数的声明
阅读全文
posted @ 2022-09-26 21:18 Sheldon2
阅读(68)
评论(0)
推荐(0)
LeetCode[2414. 最长的字母序连续子字符串的长度]
摘要: 2414. 最长的字母序连续子字符串的长度 双指针 class Solution { public: int longestContinuousSubstring(string s) { int res = 0; for(int i = 0; i < s.size(); i++){ int j =
阅读全文
posted @ 2022-09-26 20:47 Sheldon2
阅读(41)
评论(0)
推荐(0)
LeetCode[2418. 按身高排序]
摘要: 2418. 按身高排序 pair默认对first升序,当first相同时对second升序 class Solution { public: vector<string> sortPeople(vector<string>& names, vector<int>& heights) { vector
阅读全文
posted @ 2022-09-26 20:33 Sheldon2
阅读(88)
评论(0)
推荐(0)
LeetCode[198. 打家劫舍]
摘要: 198. 打家劫舍 class Solution { public: int rob(vector<int>& nums) { int n = nums.size(); vector<int> f(n + 1), g(n + 1); for(int i = 1; i <=n; i++) { f[i]
阅读全文
posted @ 2022-09-26 20:15 Sheldon2
阅读(33)
评论(0)
推荐(0)
上一页
1
2
公告