Algorithm Design 2022
文章平均质量分 60
算法设计の综合测试
可视化中间の数据变化过程
影月丶暮风
『寒月竹影江浸灭,孤雁剑与暮风随』
展开
-
算法设计与分析2022 · 期末押题专项
Bat快速获取文件夹下文件名称DIR *.* /B>Filename-list.txt2-二分搜索.CPP#include <iostream>#include <stdio.h>#include <algorithm>using namespace std;const int N = 1e5 + 7;int n, m, a[N], t;/*题目:从小到大不下降序列,n元素m个询问给出询问元素的起止位置,如果没有输出00*///原创 2022-07-07 20:08:30 · 401 阅读 · 0 评论 -
算法设计与分析2022 · 云端实验库
算法实验2022,云端测试库原创 2022-06-09 08:32:11 · 302 阅读 · 0 评论 -
算法设计与分析2022 · 云端作业包
为了防止作业本丢失,在云端留个存档第十一周众数问题#include <iostream>#include <cstring>#include <stdio.h>#include <algorithm>using namespace std;const int N = 1e5 + 7;int a[N];int zs, cs;// 1 2 2 2 4 5void range(int *a, int n, int &原创 2022-05-19 20:43:48 · 244 阅读 · 0 评论 -
算法2022 · 最小公倍数/最大公约数 · 欧几里得算法
挖坑原创 2022-04-07 23:09:16 · 212 阅读 · 0 评论 -
算法2022 · SPFA模板
只是挖坑原创 2022-04-07 22:37:42 · 195 阅读 · 0 评论 -
算法2022 · DFS BFS Prim Kruskal Dijkstra Floyd
缩小地图规模,砍去地图编辑功能,移除出错判断,专注于算法本身科研部已完成对优先队列运用的研究,需要开拓(结构体+优先队列)研究(边结点:2点坐标+权值+方向x-->y),需要依照【权值】元素从小到大排序(克鲁斯并查集思想?),大话数据结构 提及【回环形成】判断的结构,简单过硬予以实现#include <iostream>#include <string.h>#include <stdio.h>#include <queue>usin原创 2022-04-04 23:08:05 · 958 阅读 · 0 评论 -
算法2022 · 中缀表达式 转 后缀表达式 并计算
关于思想的说明:中缀转后缀 符号优先级:(栈空·绝对)> (左括号·特殊) >(乘除)>(加减)> (右括号·特殊) 工作框架: A.遇见数字,直接输出 B.遇见符号:判断优先级 a.无括号:判断优先级 弹出所有优先级【大于等于】当前符号的符号...原创 2022-04-04 18:37:44 · 578 阅读 · 0 评论 -
算法2022 · KMP (next/nextval)
#include <iostream>#include <stdio.h>#include <string.h>using namespace std;#define MAXX 500char a[MAXX], b[MAXX];int n[MAXX] = {}, v[MAXX] = {};void init(){ printf("【KMP算法测试】鸿蒙·乾坤 Day213\n"); printf("输入【主串A】:"); scan.原创 2022-04-03 14:26:20 · 79 阅读 · 0 评论 -
算法2022 · 简单回溯
旅行の售货员//售货员の周游路线 P122//从1出发,各点走一遍后回到起点#include <iostream>#include <stdio.h>#include <string.h>using namespace std;#define maxx 0x3f3f3fint c, e; //【城市个数】【道路数量】int w1[100], way1; //当前路径 当前总路程int w2[100], best; //最佳路原创 2022-03-21 17:02:06 · 211 阅读 · 0 评论 -
算法2022 · 简单贪心
测试1原创 2022-03-21 08:30:06 · 64 阅读 · 0 评论 -
算法2022 · 动态规划
最初的篇章 感谢!bilibili:正月点灯笼 BV18x411V7fm工作の选择问题(背包)原创 2022-03-17 20:31:39 · 618 阅读 · 0 评论 -
算法2022 · 递归与分治
简单的阶乘#include <iostream>#include <stdio.h>using namespace std;#define ull unsigned long longull JC(ull k){ if (k == 1) //终止条件 return 1; return JC(k - 1) * k;}int main(){ // n元素阶乘测试 ull n; printf("nの阶乘,请输入原创 2022-03-15 19:46:19 · 68 阅读 · 0 评论