| ||||||||||
Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
第一次进第一榜虽然是第一榜最后一名 也要庆祝一下 #include <iostream> using namespace std; int num[1005]; int main() { int n,temp,temp2,cnt,i; while(scanf("%d",&n)&&n) { temp=0,cnt=0;; for(i=0;i<n;i++) { scanf("%d",&num[i]); temp^=num[i]; } if(temp!=0) { for(i=0;i<n;i++) { temp2=temp^num[i]; if(temp2<num[i]) cnt++; } } printf("%d\n",cnt); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator