摘要: 主要利用题目中的条件,并不需要排序。因为出现的数不超过10000。只需要统计0 - 10000出现数的个数,就可以确定出现数的排名。#include #include #include int main() { int n, q; int que[10005]; int coun... 阅读全文
posted @ 2013-01-04 17:08 zcube 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 字符串排序。#include #include #include int cmp(const void *a, const void *b) { char *_a = (char *)a; char *_b = (char *)b; return strcmp(_a, _b);}... 阅读全文
posted @ 2013-01-04 16:12 zcube 阅读(141) 评论(0) 推荐(0) 编辑