
笔记
悦穆
打工人
展开
-
银行家算法 C语言实现 带注释
银行家算法 C语言实现 带注释加粗样式****在这里插入代码片#include <stdio.h>#define M 100#define N 50 ///定义M个进程,N类资源void Init();bool checkSecurity (int);void show();int Bank(int);int Available[M]; ///可利用资源数组int Max[N][M]; ///最大需求矩阵int Allocation[N][M]; ///原创 2020-12-28 16:07:06 · 902 阅读 · 0 评论 -
2020-11-23
#include#include#include#include<bits/stdc++.h>typedef struct Ln{int f; ///进程号int n; ///进程页数int len; ///进程大小char name[8];///进程名int y[100]; ///页表,下标表示页号,内容表示进程各页所在物理块struct Ln *next;} Ln, *List;int S[100]; ///内存物理块,0原创 2020-11-23 11:12:49 · 153 阅读 · 0 评论 -
SDUTACM M - 翻译布尔表达式
M - 翻译布尔表达式Description大家都学过了布尔表达式的翻译,其中有一个拉链-回填技术,这次我们就练习这个技术。Input输入为一行字符串,例如: a < b or c < d and e < f每个符号都用空格间隔。其中逻辑运算符包含 and 和 or , 关系运算符包含 < 、> 、<= 、 >= 、== 、 != 。Output假链跳到0,真链跳到1,表达式序号从100开始排。能AC的代码#include <bits/st原创 2020-11-09 14:57:56 · 1135 阅读 · 0 评论