首页 > 其他 > 详细

nyoj528 找球号(三) set容器的应用

时间:2015-04-23 17:34:41      阅读:208      评论:0      收藏:0      [点我收藏+]

set容器的用法  具体可以看我的另外一篇stl的应用http://blog.csdn.net/su20145104009/article/details/44562659

 
#include <stdio.h>
#include <set>
using namespace std;
int main()
{
	int n,x;
	set<int>s;
	while(scanf("%d",&n)!=EOF)
	{
		for(int i=0;i<n;i++)
		{
			scanf("%d",&x);
			if(s.find(x)!=s.end())
			s.erase(x);
			else
			s.insert(x);
		}
		printf("%d\n",*s.begin());
		s.clear();
	}
	return 0;
}        


nyoj528 找球号(三) set容器的应用

原文:http://blog.csdn.net/su20145104009/article/details/45223063

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!