导航

2021年10月14日 #

C++实现哈夫曼树算法

摘要: 算法 阅读全文

posted @ 2021-10-14 15:51 塍 阅读(36) 评论(0) 推荐(0)

C++实现选择排序算法

摘要: // 选择排序.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 #include <iostream> #include<random> #include <iomanip> using namespace std; typedef struct slist { int d 阅读全文

posted @ 2021-10-14 15:50 塍 阅读(120) 评论(0) 推荐(0)

C++实现折半查找算法

摘要: #include <iostream> using namespace std; int bisearch(int* a,int low,int high,int h)//递归调用 { int f = (low + high) / 2; if (a[f] == h) return f; else i 阅读全文

posted @ 2021-10-14 15:49 塍 阅读(149) 评论(0) 推荐(0)

C++实现最短路径算法

摘要: #include <iostream> #include <iomanip> #define int_max 5000 #define max_ver 20 typedef enum { dg, dn, udg, udn } graphkind; typedef struct arccell { i 阅读全文

posted @ 2021-10-14 15:48 塍 阅读(141) 评论(0) 推荐(0)

C++实现最小生成树_普利姆算法

摘要: #include <iostream> #include <iomanip> #define int_max 5000 #define max_ver 20 typedef enum { dg, dn, udg, udn } graphkind; typedef struct arccell { i 阅读全文

posted @ 2021-10-14 15:47 塍 阅读(68) 评论(0) 推荐(0)

python水仙花数求和

摘要: 代码展示 sum = 0 for x in range(100, 1000): a = x // 100 b = x // 10 % 10 c = x % 10 if a**3 + b**3 + c**3 == x: sum += 1 print(sum) 阅读全文

posted @ 2021-10-14 15:42 塍 阅读(701) 评论(0) 推荐(0)

python回文数求和

摘要: 代码展示 sum = 0 for x in range(100, 201): a = x // 100 b = x // 10 % 10 c = x % 10 if a == c: sum += x print(sum) 阅读全文

posted @ 2021-10-14 15:40 塍 阅读(253) 评论(0) 推荐(0)

python排序和逆排序

摘要: 代码展示 import random data = list(range(10)) random.shuffle(data) print('原数据形式为: ', data) print('升序后为: ', sorted(data)) print('逆序后为: ', list(reversed(dat 阅读全文

posted @ 2021-10-14 15:40 塍 阅读(109) 评论(0) 推荐(0)

python使用matplotlib输出柱状图

摘要: 程序 阅读全文

posted @ 2021-10-14 15:36 塍 阅读(65) 评论(0) 推荐(0)

python使用pandas导入csv

摘要: 程序 阅读全文

posted @ 2021-10-14 15:35 塍 阅读(249) 评论(0) 推荐(0)

python使用pandas导入数据并通过matlotlib输出坐标图

摘要: 程序 阅读全文

posted @ 2021-10-14 15:32 塍 阅读(200) 评论(0) 推荐(0)

python使用matplotlib和numpy输出坐标图_双函数

摘要: 程序 阅读全文

posted @ 2021-10-14 15:21 塍 阅读(190) 评论(0) 推荐(0)