摘要: fork函数在新的子进程中运行相同的程序,新的子进程是父进程的一个复制品。execve函数在当前进程的上下文中加载并运行一个新的程序。它会覆盖当前进程的地址空间,但并没有创建一个新的进程。新的程序仍然有相同的PID,并且继承了调用execve函数已打开的所有文件描述符 阅读全文
posted @ 2013-07-21 20:05 OpenSoucre 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 int main(){ 6 int r,c; 7 cin >>r>>c; 8 vector row(r,false),col(c,false); 9 char ch;10 for(int i = 0 ; i > ch;13 if(ch == 'S') row[i] = col[j] = true;14 }15 }16 int cnt = 0;17 for(int i = 0 ; i < ... 阅读全文
posted @ 2013-07-21 18:05 OpenSoucre 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 using namespace std; 5 6 int main(){ 7 int n,m; 8 cin >> n >> m; 9 vector flag(n+1,false);10 for(int i = 0 ; i > a>>b;13 flag[a]=flag[b]=true;14 }15 int centerPoint = 0;16 for(int i = 1 ; i <= n ; i ++ ){17 if(!flag[i]){18 ... 阅读全文
posted @ 2013-07-21 18:03 OpenSoucre 阅读(300) 评论(2) 推荐(0) 编辑