06 2011 档案

摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2095和google入围赛的一道题一摸一样啊!View Code #include<iostream>using namespace std;int sum ,a;int n , i;int main(){ while(scanf("%d" , &n)!=EOF, n) { sum=0; for(i=0;i<n;i++) { scanf("%d",&a); sum=sum^a; } printf("%d\n",sum 阅读全文
posted @ 2011-06-06 14:21 聊聊IT那些事 阅读(410) 评论(0) 推荐(0) 编辑
摘要:View Code //找活动结束时间最小的,即以活动结束时间进行排序#include<iostream>#include<algorithm>using namespace std;int t ,k;struct node{ int a,b; }s[101];int cmp( node x, node y ){ if(x.b==y.b) return x.a<y.a; return x.b<y.b;} int main(){ int i,j; while( cin>>t , t ) { for( i = 0 ; i < t ; i++ ) 阅读全文
posted @ 2011-06-01 17:09 聊聊IT那些事 阅读(320) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示