![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模拟
文章平均质量分 73
cjliux
这个作者很懒,什么都没留下…
展开
-
约瑟夫问题-函数功能分解
#include#includeusing namespace std;struct Node { int num; Node *next;};Node *Lcreat(int num){ int cnt = 0; Node *h = NULL; Node *pr = new Node; h = pr; h->num = num; while(--num) {原创 2015-03-21 20:25:16 · 572 阅读 · 0 评论 -
C++ 求两日期间相隔天数
#include #include #include using namespace std;struct Date{ int year; int month; int day; Date(int y = 0, int m = 0, int d = 0): year(y), month(m), day(d) {} Date &原创 2015-05-31 23:50:58 · 835 阅读 · 0 评论 -
C++环形矩阵填充实现
#include#include#include#include#include#include#includeusing namespace std;int main(void) { int n; while(cin >> n) { map > tbl; for(int i = 0; i < n; ++i)原创 2015-06-03 20:22:23 · 1794 阅读 · 2 评论 -
C++实现KMP模式匹配算法
#include#include#includeusing namespace std; void Next(const string & pat,vector & next){ next.resize(pat.length()); if(pat.length() == 0) return; next[0] = -1; for(size_t pos = 1; pos原创 2015-08-20 23:22:52 · 1004 阅读 · 0 评论 -
C++实现离散事件模拟--Bank_Simulation
/** LkQueue.h** Created on: Oct 7, 2015* Author: chris*/#ifndef LKQUEUE_H_#define LKQUEUE_H_#includeusing namespace std;templatestruct LQNode{ ElemType data; LQNode * next; LQ原创 2015-10-07 11:51:31 · 1133 阅读 · 0 评论