csu1217: 奇数个的那个数
摘要:
给定些数字,这些数中只有一个数出现了奇数次,找出这个数。本来用了STL set,MLE了,改为手写式的set(链表),注意一点:插入操作与删除操作不会并存。别人的代码真短。。//1217# include <stdio.h># include <stdlib.h>typedef struct atom{ int key; struct atom *next;} atom; int main(){ int n, t; atom *set, *tmp, *x, *y; while (scanf("%d", &n)==1) { if (n > 阅读全文
posted @ 2012-02-17 22:24 getgoing 阅读(316) 评论(1) 推荐(1) 编辑