- 博客(41)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 Ubuntu20.04安装graph-tool
step1:查看系统发行版本step2: 在 /etc/apt/sources.list文件中添加一行step3: 下载密钥
2022-11-26 15:53:43
1895
1
原创 python新建文件夹
import ospath = 'D:/' # 文件保存路径folder_name = 'xxx' #待创建的文件夹的名字crate_dir = os.path.join(path, folder_name)os.makedirs(crate_dir , exist_ok=True)
2021-05-14 14:46:46
421
原创 矩阵相乘
目录矩阵乘法哈达玛积克罗内客积(Kronecker Product)矩阵乘法, A的每一行元素乘以B的每一列元素相加哈达玛积克罗内客积(Kronecker Product)
2021-05-07 12:16:40
245
原创 jupyter Notebook相关内容整理
jupyter Notebook提示到后台服务的连接没能建立, 我们会继续尝试重连, 请检出网络连接...还有服务配置服务端出现 ModuleNotFoundError:No module named 'prompt_toolkit.formatted_text解决方法:更新控制台pip install -U jupyter_console...
2021-04-28 20:58:47
235
原创 numpy库的max 和 argmax
numpy库max函数import numpy as npX = np.matrix([[1,3,2],[4,1,2],[3,1,5]])y0 = np.max(X,axis = 0)y1 = np.max(X,axis = 1)y2 = np.max(X)print(X)print("每列的最大值:",y0)print("每行的最大值:\n",y1)print("整个矩阵的最大值:\n",y2)输出:[[1 3 2] [4 1 2] [3 1 5]]每列的最大值
2021-04-28 11:11:31
333
原创 吉大2020软学数据结构+操作系统回忆
数据结构一、1.一个中缀中缀表达式转为后缀表达式2.五个权值不同的元素,能构成多少种哈弗曼树3.前序遍历和后序遍历相同的二叉树的特点,高度为4的这样的树有几种4.有几个数(没记住)写出创建二叉查找树的过程,计算查找失败的平均查找次数5.给了一段代码,写出这段代码的渐进时间复杂度6.一倒序的序列,冒泡排序和归并排序的时间复杂度7.ABCD依次入栈,C入栈时候才允许出栈...
2020-07-11 16:39:32
566
原创 JDK环境配置
第一步:此电脑---->属性----->高级系统设置----->环境变量第二步:新建JAVA_HOME环境变量 内容:jdk的路径第三步:新建CLASSPATH环境变量 内容:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar第四步:在已有的path环境变量中新建%JAVA_HOME%\bin%JAV...
2020-02-14 17:19:29
280
原创 UVA-12169 Disgruntled Judge(扩展欧几里得)
Disgruntled Judge Once upon atime, there was an NWERC judge with a tendency to create slightly too hardproblems. As a result, his problems were never solved. As you can image, thismade ou
2017-12-09 10:30:00
337
原创 POJ - 2386 Lake Counting(简单深搜)
Lake CountingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 38395 Accepted: 19066DescriptionDue to recent rains, water has pooled in various places i
2017-12-08 20:47:06
322
原创 HDU-1026 Ignatius and the Princess I(广搜+优先队列+输出路径)
Ignatius and the Princess I
2017-11-30 21:37:08
401
原创 UVA —1368 DNA Consensus String
题意:输入m个长度均为n的DNA序列,求一个DNA序列,到所有序列的总的Hamming距离尽量小。两个等长字符串的 Hamming距离等于字符不同的位置个数。输入:m(4m个长度均为n的DNA序列输出:m个序列的Hamming距离和最小的DNA序列和对应的距离。如有多解,要求为字典序最小的解。字符串题,千万不要忘记在要输出的字符串后加'\0'#incl
2017-11-08 20:53:57
358
原创 UVA - 10082 WERTYU
题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1023题意:输入错位的字符串,把它转化成正确的字符串输出学习:一个‘\’是转义字符,两个是输出‘\\’;思路:使用一个常量数组储存键盘,输入每个字符直接输出字符使用getchar();
2017-10-28 11:15:41
957
原创 CodeForces - 492B
B. Vanya and Lanternstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya walks late at night along a stra
2017-10-25 20:26:38
441
原创 HDU - 5444 Elven Postman(二叉树)
Elven PostmanTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 379 Accepted Submission(s): 200Problem DescriptionElves are
2017-10-20 20:02:42
773
原创 二叉树的建树方法
1.数组建树给一个普通序列:567432#include#includeint tree1[300010];int s[300010];int n;void Insert(int w,int *tree){ int c=w; int now=1; while(tree[now]!=-1)//没有被赋值 { if(tree[now]
2017-08-09 14:26:10
4103
原创 【记忆化搜索】 HDU-1978 How many ways
How many ways Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
2017-08-03 19:08:54
398
转载 动态规划总结及题目推荐
源博客链接 http://blog.youkuaiyun.com/cc_again?viewmode=list ---------- Accagain 2014年5月15日动态规划一直是ACM竞赛中的重点,同时又是难点,因为该算法时间效率高,代码量少,多元性强,主要考察思维能力、建模抽象能力、灵活度。源博主动态规划博客地址:http://blog.c
2017-08-03 11:00:39
2053
原创 HDU-4540 威威猫系列故事——打地鼠 (动态规划)
威威猫系列故事——打地鼠 Time Limit: 300/100 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)
2017-08-03 09:30:00
676
原创 CodeForces - 363C Fixing Typos (字符串处理)
C. Fixing Typostime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMany modern text editors automatically check
2017-08-03 09:18:48
452
原创 HDU - 2822 Dogs(广搜+优先队列)
Dogs Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
2017-08-02 21:57:19
466
原创 HDU-1242 Rescue( 广搜 + 优先队列)
Rescue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
2017-08-02 21:09:27
540
原创 HDU-5655 CA Loves Stick(数学)
CA Loves Stick Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)
2017-08-02 20:54:28
372
原创 POJ-2367 Genealogical tree(拓扑排序)
Genealogical treeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5808 Accepted: 3810 Special JudgeDescriptionThe system of Martians' blood relations
2017-08-02 20:38:20
311
原创 POJ-3684 Physics Experiment(弹性碰撞)
Physics ExperimentTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2595 Accepted: 913 Special JudgeDescriptionSimon is doing a physics experiment w
2017-07-31 21:11:56
381
原创 POJ-1751 Highways (最小生成树)
HighwaysTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16471 Accepted: 4824 Special JudgeDescriptionThe island nation of Flatopia is perfectly fl
2017-07-31 20:45:57
314
原创 NSOJ - 5864 ?????
题目描述最近,有一种游戏很火叫“Berlogging”,大家都在玩,于是你也叫来你的同学过来玩你们一共进行了n轮游戏,每一轮都有可能得分或者失分,当然,n轮结束后,如果仅有一个人的得分最高,那么他就赢了,如果有多个人得分都是最高的,那么问题就麻烦了,到底谁赢呢?因此我们规定第一个人先得分最高的赢,每个人的最初的分值都为0,在游戏结束时,保证至少有一个人最终得分为正。
2017-07-31 14:40:03
523
原创 HDU-1576 A/B (扩展欧几里得算法)
A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6257 Accepted Submission(s): 4935Problem Description要求(A/B)%9973,但由于A很大,我们
2017-07-31 08:33:25
374
原创 POJ-1611 ----The Suspects
The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 39931 Accepted: 19315DescriptionSevere acute respiratory syndrome (SARS), an atypical pneu
2017-07-27 14:30:41
282
原创 POJ-2240 Arbitrage(最短路)
ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23825 Accepted: 10088DescriptionArbitrage is the use of discrepancies in currency exchange ra
2017-07-27 14:04:39
335
原创 POJ-3021 e-Coins(广搜)
e-CoinsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 699 Accepted: 348DescriptionAt the Department for Bills and Coins, an extension of today's moneta
2017-07-27 11:05:04
372
原创 POJ-2502 Subway(最短路 Dijkstra)
SubwayTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10501 Accepted: 3429DescriptionYou have just moved from a quiet Waterloo neighbourhood to a big,
2017-07-25 14:17:28
694
原创 CodeForces - 825B Five-In-a-Row
Five-In-a-Rowtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob play 5-in-a-row game. They have
2017-07-20 20:22:01
363
原创 POJ-3669 Meteor Shower
Meteor ShowerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 20561 Accepted: 5347DescriptionBessie hears that an extraordinary meteor shower is coming
2017-07-20 17:29:37
298
原创 HDU-1272 小希的迷宫(并查集)
小希的迷宫Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 51889 Accepted Submission(s): 16173Problem Description上次Gardon的迷宫城堡小希玩了很
2017-07-20 15:22:55
350
原创 HDU-1598 find the most comfortable road (并查集+枚举+贪心)
find the most comfortable road Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
2017-07-20 10:15:41
360
原创 POJ-1426 Find The Multiple(深搜)
Find The MultipleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 32481 Accepted: 13581 Special JudgeDescriptionGiven a positive integer n, write a
2017-07-20 08:43:31
340
原创 HDU-2578 Dating with girls(1) (map/set/折半法)
Dating with girls(1) 题意:给T组数据; 输入n,k; 输入n个数,在这n个数中找到两个数相加等于k的一共有几组?注意:1.a+b与b+a,算两组; 2.连续两个相等的数字如n个数为(1,1,3,2,6),k=4;答案是3种;两个1只能看一个; 3.若用折半法提前排序;代码:
2017-07-14 20:31:01
370
原创 NYOJ—488 素数环
素数环时间限制:1000 ms | 内存限制:65535 KB难度:2描述有一个整数n,把从1到n的数字无重复的排列成环,且使每相邻两个数(包括首尾)的和都为素数,称为素数环。为了简便起见,我们规定每个素数环都从1开始。例如,下图就是6的一个素数环。输入有多组测试数据,每组输入一个n(0输出每组第一行输出对应的Case序号
2017-05-10 20:24:56
456
原创 排序并插入
排序并插入 时间限制:500ms内存限制:32000kb题目内容: 编写程序,在主函数中定义一个有10个元素的整型一维数组,用户输入9个数据,调用函数,对数组元素进行从小到大排序后,在函数中输入
2017-05-09 18:23:59
1802
原创 NYOJ-845无主之地1
无主之地1时间限制:1000 ms | 内存限制:65535 KB难度:0描述子晓最近在玩无主之地1,他对这个游戏的评价不错,结合了FPS与RPG元素,可玩度很高。不过,他发现了一代的任务系统做的不好,任务系统并没有帮他统计清楚哪个区域有多少任务,而且,给任务的时候呢,也比较散乱。比如,在1区域的一个任务点,你领到了4个任务;2区域的一个任务点,你领到了3个任务;游戏一段时间后,你又在1区域另
2017-04-24 19:22:42
544
矩阵的迹求导&矩阵求导&哈达玛积求导混合怎么解?
2021-03-22
TA创建的收藏夹 TA关注的收藏夹
TA关注的人