摘要: #include#include#include#include#include#include#include#includeusing namespace std;const int total_i = 10;const int mf1 = 3;const int... 阅读全文
posted @ 2017-07-20 16:21 凝视深空 阅读(213) 评论(0) 推荐(0)
摘要: 给定一个正整数N代表火车数量,0 //火车进站#include#include#includeusing namespace std;bool IsPopOrder(vector pushV,vector popV) { stack s; ... 阅读全文
posted @ 2017-05-26 18:46 凝视深空 阅读(315) 评论(0) 推荐(0)
摘要: 代码实现了模拟进程状态转换及其相应PCB内容、组织结构的变化。#includeusing namespace std;typedef struct pcb{ int id; struct pcb *next;}pcb;pcb *ready,*run,*bl... 阅读全文
posted @ 2017-04-23 15:49 凝视深空 阅读(820) 评论(0) 推荐(0)
摘要: 前段时间做编译课设时老师提到了汉诺塔的非递归不容易做出来,于是我趁着寒假有点时间就想试着搞一搞。下面我把我的一些草稿先列出来,以免以后忘记。下面这个模型是适合于偶数个盘片的情况的。奇数的情况类似可得。根据图1,我把每三个输出(如ab,ac,bc表示表示盘片从a移到b上... 阅读全文
posted @ 2017-01-26 21:25 凝视深空 阅读(205) 评论(0) 推荐(0)
摘要: #includeusing namespace std;typedef struct student{ int id;//学号 string sex; string name; int cpp;//c++成绩 struct studen... 阅读全文
posted @ 2016-10-03 17:10 凝视深空 阅读(1318) 评论(0) 推荐(0)