- 博客(47)
- 收藏
- 关注
原创 深度学习PyTorch入门基础2,用例子来学习展示PyTorch
目录前言开始学习张量Tensor 来实现神经网络感觉很繁琐?看看自动求导机制吧自定义Pytorch的自动求导函数前言你好! 这是我第二篇学习PyTorch的笔记,通过一些案例来进行学习,防止自己忘记在这里记录一下,要是发现有什么可以改进的地方请一定告诉我啦~开始学习首先 本文主要讲解两个主要特征An n-dimensional Tensor, similar to numpy but...
2020-04-26 23:01:35
382
原创 深度学习PyTorch入门基础,让你在60分钟内了解PYTORCH
Pytorch一小时入门教程前言虽然之前已经学习了很多有关机器学习的知识,但都是理论了解,真正遇到项目才发现自己实操验证不足,故而选择从基础学习,正好自己做一下笔记。Pytorch是什么它是一个基于python的科学计算库,致力于为两类用户提供服务:作为NumPy的替代品,并使用强大的GPU来进行运算一个可以提供最大灵活性和速度的深度学习研究平台话不多说 冲!1.张量的概念张...
2020-04-24 21:30:37
408
原创 如何在移动硬盘上安装Linux系统?WIN10 + Ubuntu 18.0.4(LTS)
如何给限制移动硬盘装上LINUX,玩转LINUX和移动存储两不误前言工具准备第一步:对硬盘进行分区处理第二步:制作启动U盘第三步:安装Ubuntu一些补充的地方:前言疫情期间无法开学,只能在家学习,很多相关人工智能的模型要在linux系统下实现,正好手边刚刚更换下一块128g的ssd,再加上硬盘盒就变成移动硬盘,闲着也太亏了,于是乎就有了在移动硬盘上安装linux系统的打算,并且这样不影响原来...
2020-04-19 17:27:22
16774
6
转载 计算1至n中数字X出现的次数
描述计算 1 至 n 中数字 X 出现的次数,其中n≥1,X∈[0,9]n≥1,X∈[0,9]。解题思路这是一道比较简单的题目,举个例子先:假设n=11,X=1n=11,X=1,那么就是求 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 这 11 个数字中 1 出现的次数,很容易能看出来结果为 4,在 1 和 10 中各出现了一次,在 11 中出现了两次。最...
2019-08-17 10:52:02
1032
原创 2019牛客暑期多校训练营(第六场)D Move【暴力枚举】
After the struggle of graduating from college, TangTang is about to move from a student apartment to his new home.TangTang has n items to move, the i-th of which is of volume viv_ivi. He can pack a...
2019-08-06 18:00:02
303
原创 2019牛客暑期多校训练营(第六场)J Upgrading Technology 【暴力+前缀和】
题目描述Rowlet is playing a very popular game in the pokemon world. Recently, he has encountered a problem and wants to ask for your help.In this game, there is a technology tree system. There are n k...
2019-08-06 17:33:48
491
转载 扩展kmp学习
拓展kmp是对KMP算法的扩展,它解决如下问题:定义母串S,和字串T,设S的长度为n,T的长度为m,求T与S的每一个后缀的最长公共前缀,也就是说,设extend数组,extend[i]表示T与S[i,n-1]的最长公共前缀,要求出所有extend[i](0<=i<n)。扩展KMP求的是对于原串S1的每一个后缀子串与模式串S2的最长公共前缀。它有一个next[]数组和一个exte...
2019-08-06 11:38:44
171
原创 hdu 6629 string matching【2019 Multi-University Training Contest 5】【扩展kmp】
string matchingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 630Accepted Submission(s): 240Problem DescriptionString matching is...
2019-08-06 11:08:00
265
原创 2019牛客暑期多校训练营(第五场)G subsequence 1【DP】
时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述You are given two strings s and t composed by digits (characters '0' ∼\sim∼ '9'). The length of s is n and the length ...
2019-08-03 01:12:04
161
原创 2019牛客暑期多校训练营(第五场)B generator 1 【10进制矩阵快速幂】【斐波那契循环节】
时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述You are given four positive integers x0,x1,a,bx_0, x_1, a, bx0,x1,a,b. And you know xi=a⋅xi−1+b⋅xi−2x_i = a \cdot x_...
2019-08-02 17:58:05
217
原创 矩阵快速幂 逆元
二进制快速幂 O(logn)typedef long long ll;ll mod;ll qpow(ll a, ll n)//计算a^n % mod{ ll re = 1; while(n) { if(n & 1)//判断n的最后一位是否为1 re = (re * a) % mod; n >&...
2019-08-02 01:49:09
802
原创 三个重要的同余式——威尔逊定理,费马小定理,欧拉定理(扩展)
首先要明白,以a≡b(modn)为例子“≡”是数论中表示同余的符号(注意!!这个不是恒等号)同余的定义是这样的:给定一个正整数n,如果两个整数a和b满足a-b能被n整除,即(a-b)modn=0,那么就称整数a与b对模n同余,记作a≡b(modn),同时可成立amodn=b。也就是相当于a被n整除余数等于b的意思。威尔逊定理(p−1)!≡p−1≡−1(modp)...
2019-08-01 10:48:46
1131
原创 hdu 6623 Minimal Power of Prime【2019 Multi-University Training Contest 4】【质因子分解】
Minimal Power of PrimeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1528Accepted Submission(s): 331Problem DescriptionYou are give...
2019-08-01 01:03:10
164
原创 2019 Multi-University Training Contest 2--Keen On Everything But Triangle--hdu--6601
Keen On Everything But TriangleTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 3426Accepted Submission(s): 806Problem DescriptionN...
2019-07-30 22:01:21
158
原创 2019 Multi-University Training Contest 1--Vacation--hdu--6581
VacationTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2273Accepted Submission(s): 1018Special JudgeProblem DescriptionTom and J...
2019-07-26 15:50:12
166
原创 2019 Multi-University Training Contest 1--Path--hdu--6582
PathTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2034Accepted Submission(s): 555Problem DescriptionYears later, Jerry fell in l...
2019-07-24 02:10:34
172
原创 Educational Codeforces Round 69 (Rated for Div. 2) D. Yet Another Subarray Problem(dp 最大子区间)
D. Yet Another Subarray Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an arraya1,a2,…,ana1,a2,…,anand ...
2019-07-24 00:51:20
228
原创 ZOJ - 4034 Mahjong Sorting(模拟、阅读理解题)
Mahjong SortingTime Limit:1 Second Memory Limit:65536 KBDreamGrid has just found a set of Mahjong withsuited tiles and a White Dragon tile in his pocket. Each suited tile has a suit (Cha...
2019-05-04 15:20:06
304
原创 【浙大第19届校赛:B】Even Number Theory (数论+大数)
有数学符号图片,复制不过来,所以只能附上原题地址题目地址:http://acm.zju.edu.cn/onlinejudge/showContestProblem.do?problemId=5970题意:给出了三个新定义E-prime :∀ num∈ E,不存在两个偶数a,b,使得 num=a*b;(简言之,num的一对因子不能全为偶数) E-prime factorizatio...
2019-04-30 16:21:25
320
原创 桂林电子科技大学第三届ACM程序设计竞赛 I 选择
链接:https://ac.nowcoder.com/acm/contest/558/I来源:牛客网小猫在研究序列。小猫在研究选择。给定一个长度为N的序列a1,a2,…,aN,请你在这N个元素中选出一些(可以不选,可以全选),使得对于任意1≤i<N,ai与ai+1不被同时选,求选出的数的和最大是多少。输入描述:第一行一个正整数T,表示数据组数。每组数据的第一行一个正...
2019-04-14 21:47:33
246
原创 Codeforces Round #551 (Div. 2)C - Serval and Parenthesis Sequence
C. Serval and Parenthesis Sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputServal soon said goodbye to Japari kindergarte...
2019-04-14 07:47:40
207
原创 HDU6463 超级无敌简单题 [暴力or小技巧]
Problem Description通常来说,题面短的题目一般都比较难,所以我要把题面写得很长很长。通常来说,题面短的题目一般都比较难,所以我要把题面写得很长很长。通常来说,题面短的题目一般都比较难,所以我要把题面写得很长很长。鸽子数字由以下过程定义:从任何正整数开始,将数字替换为其各个数位的平方和,并重复该过程,直到该数字等于1。如果不能,则这个数字不是鸽子数。例如7是鸽子数,因...
2019-03-17 10:47:56
612
原创 HDU6462 人类史上最大最好的希望事件 [前缀和]
Problem Description作为CNCS的半壁江山,狗哥常常在宇宙中心邵阳眺望黄浦江,夜晚的星空总是迷人,有时候还能见到彗星滑落。狗哥是幸运的,他在两秒钟内看到了十七颗彗星划过天际,作为打ACM的学者,自然不会有「稳定-1」情况。他开始研究彗星运动的轨迹,发现他们都遵照斐波那契螺旋线在运动着。尤里卡!狗哥觉得这就是找寻「生命,宇宙和一切的终极答案」的精要所在,但是怎么表示呢?狗...
2019-03-17 10:10:05
391
原创 Codeforces 1084 B. Kvass and the Fair Nut
B. Kvass and the Fair Nuttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Fair Nut likes kvass very much. On his birthday par...
2018-12-21 15:58:31
326
原创 Codeforces Round #526 (Div. 2) A
A. The Fair Nut and Elevatortime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Fair Nut lives in nstory house. ai people live ...
2018-12-21 15:45:11
212
原创 Codeforces Round #514 (Div. 2) - C Sequence Transformation (思维gcd)
C. Sequence Transformationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's call the following process a transformation of ...
2018-10-06 17:57:03
276
原创 2018 Multi-University Training Contest 9--Rikka with Nash Equilibrium--hdu--6415
Rikka with Nash EquilibriumTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 898 Accepted Submission(s): 346 Problem DescriptionNash ...
2018-08-21 11:36:10
228
原创 2018 Multi-University Training Contest 8--Character Encoding--hdu--6397
Character EncodingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 932 Accepted Submission(s): 358 Problem DescriptionIn computer sci...
2018-08-16 15:01:37
205
原创 2018 Multi-University Training Contest 7--Age of Moyu--hdu--6386
Age of MoyuTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2178 Accepted Submission(s): 673 Problem DescriptionMr.Quin love fishes s...
2018-08-14 17:08:53
189
原创 Codeforces Round #502 (in memory of Leopoldo Taravilse, Div. 1 + Div. 2) C. The Phone Number
C. The Phone Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMrs. Smith is trying to contact her husband, John Smith, but ...
2018-08-09 14:25:55
327
原创 2018 Multi-University Training Contest 5--Everything Has Changed--hdu--6354
Everything Has ChangedTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 765 Accepted Submission(s): 445Special JudgeProblem Description...
2018-08-07 17:32:09
172
原创 2018 Multi-University Training Contest 4--Problem B. Harvest of Apples--hdu--6333
Problem B. Harvest of ApplesTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3018 Accepted Submission(s): 1180 Problem DescriptionThe...
2018-08-07 15:22:31
194
原创 2018 Multi-University Training Contest 5--Beautiful Now--hdu--6351
Beautiful NowTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1635 Accepted Submission(s): 603Problem DescriptionAnton has a positive...
2018-08-07 14:35:02
179
原创 2018 Multi-University Training Contest 4--Problem E. Matrix from Arrays--hdu--6336
Problem E. Matrix from ArraysTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 649 Accepted Submission(s): 289 Problem DescriptionKaza...
2018-08-02 11:50:40
237
原创 2018 Multi-University Training Contest 3--Problem A. Ascending Rating--hdu--6319
Problem A. Ascending RatingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 2019 Accepted Submission(s): 603 Problem DescriptionBefo...
2018-07-31 14:19:47
274
原创 2018 Multi-University Training Contest 2--Hack It--hdu--6301
Hack It Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1020 Accepted Submission(s): 354Special Judge Problem Description...
2018-07-28 00:56:34
283
原创 2018 Multi-University Training Contest 1--Triangle Partition--hdu--6300
Triangle Partition Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) Total Submission(s): 1356 Accepted Submission(s): 682Special Judge ...
2018-07-28 00:37:44
206
原创 2018 Multi-University Training Contest 1--Balanced Sequence--hdu--6299
Balanced SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4611 Accepted Submission(s): 1199Problem DescriptionChiaki has n strin...
2018-07-28 00:24:15
179
原创 2018 Multi-University Training Contest 1--Maximum Multiple--hdu--6298
Maximum MultipleTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1794 Accepted Submission(s): 769Problem DescriptionGiven an integer n,...
2018-07-26 15:12:20
153
原创 2018 Multi-University Training Contest 1--Distinct Values--hdu-6301
2018 ACM暑期多校联合训练 1 Distinct ValuesTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3466 Accepted Submission(s): 1130Problem Description...
2018-07-26 10:35:57
205
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人