您的位置:首页 > 其它

委派任务

2015-02-12 13:42 141 查看
/*
*Copyright (c)2014,烟台大学计算机与控制工程学院
*All rights reserved.
*文件名称:gcd.cpp
*作    者:惠睿
*完成日期:2014年2月12日
*版 本 号:v1.0
*
*问题描述:委派任务。
*/
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d,e,f,count=0;
for(a=0; a<2; a++)
for(b=0; b<2; b++)
for(c=0; c<2; c++)
for(d=0; d<2; d++)
for(e=0; e<2; e++)
for(f=0; f<2; f++)
if(a+b>1 && (a+d)!=2 && a+e+f==2 && (b+c==0 || b+c==2) && c+d==1 && (d+e==0 || d==1))
{
++count;
cout<<count<<" : "<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<" "<<f<<endl;
}
return 0;
}

运行结果:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: