也是非常复杂好吧

吴松韬  •  3个月前


include

using namespace std; int main(){

int a=0,b=0,c=0,d=0,e=0,f=0;
int max=0;
for(int a1=0;a1<=1;a1++){
	for(int b1=0;b1<=1;b1++){
		for(int c1=0;c1<=1;c1++){
			for(int d1=0;d1<=1;d1++){
				for(int e1=0;e1<=1;e1++){
					for(int f1=0;f1<=1;f1++){
						if((a1+b1>=1) and (a1+d1<2) and (a1+e1+f1==2) and (b1+c1==2 or b1+c1==0) and (c1+d1==1) and ((d1==0 and e1==0) or d1!=0) and(a1+b1+c1+d1+e1+f1>=max)){
							a=a1;
							b=b1;
							c=c1;
							d=d1;
							f=f1;
							e=e1;
							max=a1+b1+c1+d1+e1+f1;
						}
					}
				}
			}
		}
	}
}
printf("a:%d\nb:%d\nc:%d\nd:%d\ne:%d\nf:%d",a,b,c,d,e,f);
return 0;

}


Comments: