算法训练(一)

1.zoj-4049node 简单的进程模拟,大部分状况下能够直接出答案,当进入死循环的时候,不难发现,循环中所得值会出现重复,所以可视重复为死循环的标志,使用一个bool数组进行标记便可,代码以下:ios #include <iostream>数组 #include<cstring> using namespace std;spa const int N = 10100; const int M
相关文章
相关标签/搜索