标签:des style http color java os io strong
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4649 Accepted Submission(s): 2774
3 5 7 9 0
1
<span style="font-size:14px;">#include<stdio.h> int main() { int n,i,m,s; int a[1010]; while(~scanf("%d",&n),n) { s=0,m=0; for(i=0;i<n;i++) { scanf("%d",&a[i]); s^=a[i]; } //所有的按位异或a[i]的按位等于除a[i]外的所有的按位,若此值小于a[i]则 //只需在a[i]中减去相应的值,就可以构造成奇异局势 for(i=0;i<n;i++) { if((s^a[i])<a[i])//此处前面的位运算一定要加上括号,要不然会出错 m++; } printf("%d\n",m); } return 0; }</span>
标签:des style http color java os io strong
原文地址:http://blog.csdn.net/ice_alone/article/details/38582099