HDU 3293 sort
摘要:
这里最好用qsort排序,而在写cmp函数时要注意,对rank进行排序是从大到小,所以那里不要写反了,还有排序优先级是origin,,rank,字典序,这里别弄错了,我悲剧额,对rank排序一直是错的,最后听小白一说才恍然大悟,在此鸣谢小白,直接上代码#include<stdio.h>#include<stdlib.h>#include<string.h>struct e{ char w[25],o[25],l[25];}p[505];int n;int cmp1( char s1[],char s2[] ){ if( s1[0] == s2[0] ) re 阅读全文
posted @ 2011-05-03 22:44 LeeBlog 阅读(218) 评论(0) 推荐(0) 编辑