就很好(*^_^*)
码龄7年
求更新 关注
提问 私信
  • 博客:85,960
    85,960
    总访问量
  • 92
    原创
  • 14
    粉丝
  • 109
    关注
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:广东省
加入CSDN时间: 2019-12-08

个人简介:转专业的小萌新

博客简介:

就很好(*^_^*)的博客

查看详细资料
个人成就
  • 获得62次点赞
  • 内容获得33次评论
  • 获得127次收藏
  • 代码片获得370次分享
  • 博客总排名2,541,330名
创作历程
  • 92篇
    2021年
成就勋章
TA的专栏
  • VJ刷题练习
    65篇
  • matlab学习笔记
    12篇
  • 数据结构与算法笔记
    6篇
  • excel学习笔记
  • ppt学习笔记
  • C++学习
    5篇
  • word学习笔记
    4篇
  • 电子书资源分享

TA关注的专栏 0

TA关注的收藏夹 0

TA关注的社区 4

TA参与的活动 0

兴趣领域 设置
  • 数据结构与算法
    排序算法推荐算法
创作活动更多

AtomGit「码动四季·开源同行」冬季征稿活动

时序入冬,岁末收官。「码动四季」年度系列征稿,迎来最后一季—— 冬・开源年度沉淀复盘。 春播种、夏深耕、秋收获,到冬日,宜收束、梳理、回望、锚定新程。 这一季,我们邀请所有开源参与者,停下匆匆迭代的脚步,把一整年在开源世界里走过的路、踩过的坑、沉淀下的思考,落笔成文。 ## 征文主题 1️⃣ 开源项目年度迭代总结 项目全年版本演进、功能迭代、社区治理、问题复盘、数据变化,讲清这一年项目的成长与取舍。 2️⃣ 全年技术学习沉淀 知识点体系梳理、踩坑笔记、开发工具链汇总、技术栈实践心得,把零散的学习碎片整理成可复用的沉淀。 3️⃣ 2027 年开源规划与目标设定 新一年的项目路线、社区运营计划、个人技术成长目标、想尝试的开源方向,大胆写下你的开源蓝图。 4️⃣ 年度优质开源项目推荐与点评 这一年打动你的开源项目,附上你的使用体验、技术亮点、适用场景、优缺点客观点评。 5️⃣ 个人 / 团队年度开源成果全景复盘 提交 PR、Issue、文档贡献、社区分享、活动组织、项目孵化等,全景回顾属于你的开源成绩单。 6️⃣ 开源人年度故事分享 和开源相遇的故事、社区里温暖或难忘的瞬间、长期维护的孤独与成就感、开源路上的心路独白。 ![在这里插入图片描述](https://i-blog.csdnimg.cn/direct/a8280a0464f34b5fa1171ee2941876cc.png) 扫码加入码动四季投稿交流群,和更多伙伴一起交流技术!

324人参与 去参加
  • 最近
  • 文章
  • 专栏
  • 代码仓
  • 资源
  • 收藏
  • 关注/订阅/互动
更多
  • 最近

  • 文章

  • 专栏

  • 代码仓

  • 资源

  • 收藏

  • 关注/订阅/互动

  • 社区

  • 帖子

  • 问答

  • 课程

  • 视频

搜索 取消

线性时间选择——选择第k个数

线性时间选择——选择第k小的数  采用的算法思想和快速排序十分相似,选取基准进行一次快排,得到一个基准和左侧小于基准右侧大于基准的数组。然后判断基准的位置,如果第k个数在左边便接着向左递归,如果在右侧便接着向右侧递归。程序实现#include<iostream>#include<set>#include<cmath>#include<vector>#include<map>#include<string>#includ
原创
博文更新于 2021.05.01 ·
523 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

快速排序

快速排序算法  快速排序的算法思想就是每一次选取一个元素,然后以此元素为基准,将大于基准的元素放到基准的后面,将小于基准的元素放到基准的前面,然后递归下去直到只有他自己为止。平均算法时间复杂性为O(nlogn)。由于有时候会遇到数组的大部分是符合降序排序的,这样就会大大影响时间复杂性。因此,再程序中采取一个随机数来作为基准。程序实现#include<iostream>#include<set>#include<cmath>#include<vector&
原创
博文更新于 2021.05.01 ·
243 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

斐波那切数列算法

递归普通算法//斐波那切数列的递归算法template <typename Type>Type fibonacci_1(int n,Type flag){ if(n<=1)return 1; return fibonacci_1(n-1,flag)+fibonacci_1(n-2,flag);}递归免重复计算算法//斐波那切数列——保存以计算的值template <typename Type>Type fibonacci_4(int n,Ty
原创
博文更新于 2021.04.29 ·
417 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

线性规划——产销平衡

运输问题(产销平衡)  某商品有m 个产地、n 个销地,各产地的产量分别为a1,a2,…am ,各销地的 需求量分别为b,…bn , , 1 L 。若该商品由i 产地运到 j 销地的单位运价为 cij ,问应该如何调 运才能使总运费最省?  解:引入变量 xij ,其取值为由i 产地运往 j 销地的该商品数量,数学模型为显然是一个线性规划问题,当然可以用单纯形法求解。  对产销平衡的运输问题,由于有以下关系式存在:其约束条件的系数矩阵相当特殊,可用比较简单的计算方法,习惯上称为表上作业法(由
原创
博文更新于 2021.04.26 ·
5335 阅读 ·
6 点赞 ·
3 评论 ·
36 收藏

matlab线性规划

线性规划问题  在一组线性约束条件下的限制下,求一线性目标函数最大或最小的问题。线性规划标准型数学标准型:可行解:满足约束条件的解矩阵x=[x1,x2,x3,…,xn]。最优解:是目标函数达到最大值或者最小值的可行解。可行域:所有可行解构成的集合称为问题的可行解,记为R。matlab标准型:f,x,b,beq,lb,ub为列向量f称为价值向量b称为资源向量A,Aeq为矩阵Matlab线性规划函数——linprog>> help linproglinpr
原创
博文更新于 2021.04.23 ·
3167 阅读 ·
3 点赞 ·
1 评论 ·
17 收藏

按照字典顺序打印一个数的全排列

输入一个数n,按照字典顺序从小到大打印出(1-n)的全排列。两个序列的字典序大小关系等价于从头开始第一个不相同位置处的大小关系。Input正整数n(1<=n<=7)。Output按照字典顺序从大到小打印全排列。每个样例之间有一个空格Sample Input1234Output1121 22 131 2 31 3 22 1 32 3 13 1 23 2 141 2 3 41 2 4 31 3 2 41 3 4 21 4 2 31 4
原创
博文更新于 2021.03.01 ·
858 阅读 ·
0 点赞 ·
0 评论 ·
2 收藏

Prime Ring Problem UVA - 524

A ring is composed of n (even number) circles as shown in diagram. Put natural numbers 1*,2,…,n* into each circle separately, and the sum of numbers in two adjacent circles should be a prime.Note: the number of first circle should always be 1.Inputn (0
原创
博文更新于 2021.03.01 ·
1012 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Knight Moves UVA - 439

A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part
原创
博文更新于 2021.02.18 ·
242 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Tree Recovery UVA - 536

Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. This is an example of one of her creations:To record her trees for future generations, she wro
原创
博文更新于 2021.02.17 ·
160 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

S-Trees UVA - 712

  A Strange Tree (S-tree) over the variable set Xn = {x1*,x2,…,xn*} is a binary tree representing a Boolean function f : {0*,1}n → {0,*1}. Each path of the S-tree begins at the root node and consists of n + 1 nodes. Each of the S-tree’s nodes has a depth,
原创
博文更新于 2021.02.17 ·
256 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Parentheses Balance UVA - 673

You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a) if it is the empty string(b) if A and B are correct, AB is correct,© if A is correct, (A ) and [A ] is correct.Write a program that takes a se
原创
博文更新于 2021.02.17 ·
204 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Updating a Dictionary UVA - 12504

In this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-negative integers. Given an old dictionary and a new dictionary, find out what were changed.Each dictionary is formatting as follows:{ke
原创
博文更新于 2021.02.15 ·
212 阅读 ·
0 点赞 ·
1 评论 ·
0 收藏

Searching the Web UVA - 1597

  The word “search engine” may not be strange to you. Generally speaking, a search engine searches the web pages available in the Internet, extracts and organizes the information and responds to users’ queries with the most relevant pages. World famous sea
原创
博文更新于 2021.02.15 ·
240 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Bug Hunt UVA - 1596

  In this problem, we consider a simple programming language that has only declarations of onedimensional integer arrays and assignment statements. The problem is to find a bug in the given program. The syntax of this language is given in BNF as follows: 
原创
博文更新于 2021.02.14 ·
303 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Ancient Messages UVA - 1103

In order to understand early civilizations, archaeologists often study texts written in ancient languages. One such language, used in Egypt more than 3000 years ago, is based on characters called hieroglyphs. Figure C.1 shows six hieroglyphs and their name
原创
博文更新于 2021.02.13 ·
256 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

深度优先遍历

算法思想  图中一个未访问的顶点 V 开始,沿着一条路一直走到底,然后从这条路尽头的节点回退到上一个节点,再从另一条路开始走到底…,不断递归重复此过程,直到所有的顶点都遍历完成,它的特点是不撞南墙不回头,先走完一条路,再换一条路继续走。代码实现邻接矩阵实现:结构体定义:使用二维数组来定义,存入一个结构体中,记录顶点个数。演示是无向图的邻接矩阵#define MAX 10struct MGraph{ int arr[MAX][MAX]; //存储图的连通状态:1为连通,0为非连通
原创
博文更新于 2021.02.09 ·
189 阅读 ·
1 点赞 ·
0 评论 ·
0 收藏

Quadtrees UVA - 297

  A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again be split in four sub quadrants, etc. In the quadtree, the image is represent
原创
博文更新于 2021.02.09 ·
211 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Oil Deposits UVA - 572

The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that divides the land into numerous square plots. It then analyzes each
原创
博文更新于 2021.02.09 ·
180 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

Not so Mobile UVA - 839

  Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mobile is usually found hanging over cradles of small babies.  The figure illustrates a simple mobile. It
原创
博文更新于 2021.02.09 ·
174 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

The Falling Leaves UVA - 699

  Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under the trees. If the same thing happened to binary trees, how large would the piles of l
原创
博文更新于 2021.02.09 ·
203 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多