摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2095好题,用STL MAP MLE了,Google了一下,我表示这个想法我自己是想不到的,好多大牛。。。主要原理 1个数异或他自己 =0 1个数异或0 = 他自己理解了上面这个就好办了,题目中说的其他数字都出现偶数次,只一个数出现一次 如果 将 0异或他们全部,结果将是只出现一次的那个数还有帮助理解的一点,异或满足交换律~~~ 1 #include <stdio.h> 2 int main() 3 { 4 int n,value,result=0; 5 while(scanf("%d& 阅读全文
posted @ 2011-12-02 10:27 linyvxiang 阅读(163) 评论(0) 推荐(0) 编辑