2012年6月19日

着色问题

摘要: 转自:http://www.cnblogs.com/qinyg/archive/2012/06/19/2543583.html#include<stdio.h>int color[100];//int c[100][100];bool ok(int k ,int c[][100])//判断顶点k的着色是否发生冲突{ int i,j; for(i=1;i<k;i++) if(c[k][i]==1&&color[i]==color[k]) return false; return true;}void graphcolor(int n,... 阅读全文

posted @ 2012-06-19 22:20 矮人狙击手! 阅读(213) 评论(0) 推荐(0) 编辑

LRU

摘要: #include <stdio.h> #include <stdlib.h> #define mSIZE 3//分配三个内存页块 #define pSIZE 12//总共12个进程 struct mem{ int num; int count;}memery[3]={0,-1,0,-1,0,-1};static int process[pSIZE] ={1,2,3,4,1,2,5,1,2,3,4,5};//页面访问序列 void LRU(); void get();int main() { get(); printf("\n(LRU)\treplace\n&q 阅读全文

posted @ 2012-06-19 22:18 矮人狙击手! 阅读(212) 评论(0) 推荐(0) 编辑

导航