摘要:
//五个哲学家围坐在一起,两人之间都放有一个叉子,意大利面需要2个叉子吃,哲学家吃饭时候叉子只能拿左右手,哲学家除了吃饭时间其他时间都在思考 #include <stdio.h> #include <stdlib.h> #include <memory.h> #include <pthread.h> 阅读全文
摘要:
// C++年月日判断初步代码 #include <iostream> using namespace std; class Data { int year; int month; int day; public: //判断日期是否有效 bool data_check(int _year,int _ 阅读全文