蒙昧的自己
码龄10年
关注
提问 私信
  • 博客:122,221
    社区:363
    问答:1,455
    124,039
    总访问量
  • 74
    原创
  • 1,436,056
    排名
  • 22
    粉丝
  • 0
    铁粉
IP属地以运营商信息为准,境内显示到省(区、市),境外显示到国家(地区)
IP 属地:青海省
  • 加入CSDN时间: 2015-05-31
博客简介:

qq_28633157的博客

查看详细资料
个人成就
  • 获得22次点赞
  • 内容获得11次评论
  • 获得98次收藏
创作历程
  • 14篇
    2016年
  • 60篇
    2015年
成就勋章
TA的专栏
  • ZOJ
    21篇
  • 数据结构
    38篇
  • 算法
    14篇
  • 正则表达式
    7篇
创作活动更多

如何做好一份技术文档?

无论你是技术大神还是初涉此领域的新手,都欢迎分享你的宝贵经验、独到见解与创新方法,为技术传播之路点亮明灯!

179人参与 去创作
  • 最近
  • 文章
  • 代码仓
  • 资源
  • 问答
  • 帖子
  • 视频
  • 课程
  • 关注/订阅/互动
  • 收藏
搜TA的内容
搜索 取消

银行家算法的实现,有关进程资源分配的算法

的#include 的#include 的#include 使用命名空间std;typedef结构{ //进程号 INT numberOfThread; //该进程对每个资源的需求量 INT countOf_A,countOf_B; INT countOf_C; //该进程是否完成 布尔isFinish;Infor公司};//在银行家算法中,总共需要4个向量//
原创
发布博客 2016.06.27 ·
4687 阅读 ·
1 点赞 ·
0 评论 ·
1 收藏

快速排序算法中的partition函数的应用

#include#includeusing namespace std;//根据已经给出位置的基准数来对数组进行排序void partition_pos(int arr[], int left, int right, int pos);//给出相应的值来确定位置,并根据它来进行排序void partition_value(int arr[], int left, int right,
原创
发布博客 2016.05.30 ·
728 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

排序算法中的快速排列中的partition函数

#include#includeusing namespace std;/* 算法思想:根据一个基准数,每一次执行过后都会所有的比基准数大的都会在他的右边 比他小的都会在基准数的左边*/int partition(int arr[], int left, int right);void QuitSort(int arr[], int left, int right);int
原创
发布博客 2016.05.30 ·
656 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

页面置换算法 FIFO,OPT,LRU

////LRU页面置换算法,将帧内最近不常使用的置换出#include#include#include#includeusing namespace std;int returnMaxValueInVec(vectorstr){ int postion = 0; int length = str.size(); if (str.size() == 0) { return
原创
发布博客 2016.05.25 ·
2874 阅读 ·
0 点赞 ·
0 评论 ·
7 收藏

LL(1)文法分析,自上向下

//考虑LL(1)递归方式解决#include#includeusing namespace std;//声明变量,用来只是字符串内的指针int indexString = 0;//判断表达式中括号对是否匹配bool flag = true;//输入表达式的字符串string str;/*///////////////////////////////////////
原创
发布博客 2016.05.18 ·
618 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

LR分析器,自下向上分析法

#include#include#include#include#includeusing namespace std;void goto_Function(string state, string symbol);void movies(string state, string symbol);//在主函数开始时,进行初始化stackState;stackSymbol;
原创
发布博客 2016.05.17 ·
471 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

regex_replace()函数的应用与解析

#include#include#includeusing namespace std;int main(int argc, char argv[]){ string str = "this is a subsquence in the string"; regex reg("(sub)([\\w]+)"); //该正则表达式匹配sub开头的子字符串 //regex_replac
原创
发布博客 2016.03.11 ·
4665 阅读 ·
0 点赞 ·
1 评论 ·
5 收藏

关于regex_iterator()和regex_token_iterator()的区别,与他们不同参数时的不同的作用

#include#include#includeusing namespace std;int main(int argc, char argv[]){ //该程序的目的是从输入的字符串中提取所有的单词 //regex r("([\\w]+)"); //或者可以写成regx r("[[:w:]]+"); /*while (true) { string str; cout
原创
发布博客 2016.03.10 ·
2223 阅读 ·
2 点赞 ·
0 评论 ·
4 收藏

关于regex_iterator()和regex_token_iterator()的区别,与他们不同参数时的不同的作用

#include#include#includeusing namespace std;int main(int argc, char argv[]){ //该程序的目的是从输入的字符串中提取所有的单词 //regex r("([\\w]+)"); //或者可以写成regx r("[[:w:]]+"); /*while (true) { string str; cout
原创
发布博客 2016.03.10 ·
2712 阅读 ·
1 点赞 ·
1 评论 ·
4 收藏

regex_iterator()的使用sregex_iterator(),cregex_iterator()

//sregex_iterator()#include#include#includeusing namespace std;int main(int argc, char ragv[]){ regex r("[\\w]+"); while (true) { string str; cout << "输入字符:"; getline(cin, str); if (s
原创
发布博客 2016.03.08 ·
4275 阅读 ·
1 点赞 ·
0 评论 ·
6 收藏

regex_search()和getline(cin,str)函数,以及对其中正则表达式的解释

#include#include#includeusing namespace std;int main(int argc, char argv[]){ //进行注释语句的匹配 regex r("//\\s*(.+)"); //注释正则表达式: //1://为注释语句中的“//” //2:\\s为空格,换行符,制表符等 //3:\\s*为有0个或者多个空格,换行符,制表符等
原创
发布博客 2016.03.08 ·
991 阅读 ·
0 点赞 ·
0 评论 ·
1 收藏

利用正则表达式,来判断年/月/日的格式是否正确,含对于(含捕捉组)正则表达式的解析

#include#include#includeusing namespace std;int main(int argc, char argv[]){ regex r("^(\\d{4})/(0?[1-9]|1[0-9])/(0?[1-9]|[1-2][0-9]|3[0-1])$"); //对正则表达式进行解析 //1:r("^表示正则表达式的开始 //2:(\\d{4})表示
原创
发布博客 2016.03.04 ·
2065 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

详解正则表达式

#include#include#includeusing namespace std;int main(int argc, char argv){ //定义要匹配的模式字符串 regex r("^\\d{4}/(?:0?[1-9]|1[0-2])/(?:0?[1-9]|[1-2][0-9]|3[0-1])$"); string temp; while (true){ //定
原创
发布博客 2016.03.03 ·
318 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

正则表达式

#include#include#includeusing namespace std;int main(int argc,char argv[]){ string link[] = { "Roses sre #ff0000", "violets are #0000ff", "all of my base are belong to you" }; regex color_reg
原创
发布博客 2016.03.03 ·
378 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

带权有向图

//头文件Edge.h Graph.h//Edge.h//该函数的目的是记录带权有向图#ifndef EDGE_H#define EDGE_Htemplateclass Edge{public: //该图主要包括(起点,终点,权重) int start; int end; T weight; Edge(); Edge(int st, int en, T wei); b
原创
发布博客 2015.12.16 ·
3161 阅读 ·
2 点赞 ·
0 评论 ·
2 收藏

快速排序

//对快速排序算法的理解,主要是分步进行排序,每次理论上只能对一个数字进行准确排位//所以n个数,需要n次排序,算法复杂度为O(nlogn),通过谷歌,和快拍可相媲美的排序算法//是最小堆的优先队列(有关于最小堆的问题,在关于最小堆的那片博客中,我有代码说明),感兴趣的朋//友,可以去看一下,希望能够剔除一些建议,谢谢#includeusing namespace std;void sort(
原创
发布博客 2015.12.15 ·
364 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

ZOJ 2481的另一种解题思路

//想法是:给每一个数字开辟一个状态位(若该数已存在,则将该数的状态标记为true,否则为false)//在输入每一个数字是只需要判断if(flag[num]==false)即可得出是否要插入该数的结论//在插入每一个数字之后,都要将其状态改变#include#include#include#includeusing namespace std;bool flag[10000];
原创
发布博客 2015.12.15 ·
478 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

ZOJ 2358 2481

//第二题只是过了,但是有可能会超时(算法不好)#include#include#include#includeusing namespace std;int num[1024] = { 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 2, 3, 7, 25, 121, 721, 5041, 40321, 362881, 3, 7, 25,
原创
发布博客 2015.12.15 ·
591 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏

图的定义,存储结构是邻接矩阵(无向图,包含带权图)

//头文件//Edge.h#ifndef EDGE_H#define EDGE_H#includeusing namespace std;templateclass Edge{public: //边的起始与终点 int start, end; //权重 T weight; Edge(); Edge(int st, int en, T wei); bool operat
原创
发布博客 2015.12.14 ·
5673 阅读 ·
1 点赞 ·
0 评论 ·
4 收藏

ZOJ 2201 2186 2176

#include#includeusing namespace std;int main(int argc, char argv[]){ ifstream cin("F://ac.txt"); int count; int hour = 0; while (true) { cin >> count; if (count == -1) { break; }
原创
发布博客 2015.12.13 ·
377 阅读 ·
0 点赞 ·
0 评论 ·
0 收藏
加载更多