zrq495
www.zrq495.com
摘要: 开始用字符串TLE,后来改成整数AC。先排序,再计数。代码: 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 5 typedef struct 6 { 7 int num; 8 int count; 9 }node;10 11 int cmp(const void *a, const void *b)12 {13 node *pa=(node *)a;14 node *pb=(node *)b;15 return pa->num-pb->num;16 }17 18 i 阅读全文
posted @ 2012-07-18 11:37 zrq495 阅读(242) 评论(0) 推荐(0) 编辑