暖i
码龄6年
关注
提问 私信
  • 博客:82,425
    82,425
    总访问量
  • 155
    原创
  • 861,649
    排名
  • 25
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:河北省
  • 加入CSDN时间: 2018-12-25
博客简介:

weixin_44270812的博客

查看详细资料
个人成就
  • 获得38次点赞
  • 内容获得11次评论
  • 获得97次收藏
  • 代码片获得2,093次分享
创作历程
  • 3篇
    2022年
  • 1篇
    2021年
  • 13篇
    2020年
  • 139篇
    2019年
成就勋章
TA的专栏
  • pytorch
    2篇
  • 剑指offer
    1篇
  • c++
    1篇
  • pat甲级
    45篇
  • 并查集
    8篇
  • 图
    13篇
  • 线段树
    2篇
  • 树状数组
    2篇
  • st表
    2篇
  • 树
    18篇
  • 贪心
    3篇
  • pat乙级
    41篇
  • 数据结构
    19篇
  • openjudge
    1篇
  • stl
    1篇
  • 基础算法
    16篇
  • 动态规划
    8篇
  • 个人日记
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

数据集读入

Dataset类代码实战在配置好环境后from torch.utils.data import Datasetfrom PIL import Imageimport osclass MyData(Dataset): def __init__(self,root_dir,label_dir): self.root_dir = root_dir self.label_dir = label_dir self.path = os.path.jo
原创
发布博客 2022.03.17 ·
292 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

配置环境torch

pytorch 可以用pycharm 和jupyter 各有好处GPU 主要是下载cuda对应的包,弄了很长时间,最后不知道是哪一步,最终配置上了gpu官网下的要么很慢,要么根本不是gpu,是cpu,最后在官网上找的比较低版本的cuda,version,audio手动下载,手动安装教程jupyter就更气人了,在anaconda prompt手动安装,能打开,但是一直ln[*],服务器一直连接不上,还有什么runtime错误,网上说应该是版本不匹配,内核和什么 有的搞另外低,所以C:\Users
原创
发布博客 2022.03.17 ·
507 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

【无标题】

栈的数据结构,请在该类型中实现一个能够得到栈的最小元素的 min 函数在该栈中,调用 min、push 及 pop 的时间复杂度都是 O(1)。记录当前最小的只要有一个变量,实时更新最小值,但是这题要求动态的得到当前栈中最小值,只要重新定义一个栈2,,当入栈1的时候比栈2的top还小,就入栈2,这样就可以保证栈2的top()是当前最小,top()下面的是全局第二小的...
原创
发布博客 2022.03.10 ·
167 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

2021-09-28

声明是告诉编译器有这么一个东西定义是告诉编译器这是个什么东西
原创
发布博客 2021.09.28 ·
105 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1103 Integer Factorizatio

The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K−P factorization of N for any positive...
原创
发布博客 2020.02.15 ·
191 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1095 Cars on Campus

Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers of the cars crossing the gate. Now with all the information available, you a...
原创
发布博客 2020.02.13 ·
161 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1078 Hashing

The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is defined to be H(key)=key%TSiz...
原创
发布博客 2020.02.06 ·
120 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1076 Forwards on Weibo

Weibo is known as the Chinese version of Twitter. One user on Weibo may have many followers, and may follow many other users as well. Hence a social network is formed with followers relations. When a ...
原创
发布博客 2020.02.05 ·
157 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

PAT甲级记录

这个适用于我自己总结自己那些题做的不好,不会,便于考前或平时的复习和查阅;1002 1009忘记系数在过程中为0的情况1012 23分,排名细节处理不好1024 回文数处理不好,字符串理解不透彻1037 two point 思想1038 字符串比较1056 模拟,队列,比赛团体人数的判断结束技巧,细节处理1060 模拟,科学计数法,========================...
原创
发布博客 2020.02.02 ·
131 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1059 Prime Factors

Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p​1​​​k​1​​​​ ×p​2​​​k​2​​​​ ×⋯×p​m​​​k​m​​​​ .Input Specification:...
原创
发布博客 2020.02.02 ·
132 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1022 Digital Library

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a...
原创
发布博客 2020.01.29 ·
109 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1015 Reversible Primes

A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
原创
发布博客 2020.01.29 ·
102 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1001 A+B Format && 1002 A+B for Polynomials

1001 A+B FormatCalculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification...
原创
发布博客 2020.01.27 ·
145 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1021 Deepest Root

A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root ...
原创
发布博客 2020.01.25 ·
139 阅读 ·
0 点赞 ·
3 评论 ·
0 收藏

1147 Heaps

In computer science, a heap is a specialized tree-based data structure that satisfies the heap property: if P is a parent node of C, then the key (the value) of P is either greater than or equal to (i...
原创
发布博客 2020.01.23 ·
97 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1098 Insertion or Heap Sort

According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element from the input data, ...
原创
发布博客 2020.01.23 ·
118 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1114 Family Property

This time, you are supposed to help us collect the data for family-owned property. Given each person’s family members, and the estate(房产)info under his/her own name, we need to know the size of each f...
原创
发布博客 2020.01.20 ·
750 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1051 Pop Sequence

Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, …, N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the...
原创
发布博客 2019.11.21 ·
128 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1097 Deduplication on a Linked List

Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value or a...
原创
发布博客 2019.11.21 ·
138 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

1074 Reversing Linked List

Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K=3, then you must output 3→2→1→6→5→4; if K=4,...
原创
发布博客 2019.11.20 ·
105 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多