摘要:
这题目比较简单,看题干就能看出来。求逆序数,我用的是O(n^2)的算法,数据也不大,水过。也可以用归并排序来做。 1 #include 2 #include 3 #include 4 struct node{ 5 char str[100]; 6 int cnt; 7 int num; 8 }str[110]; 9 bool cmp(node a,node b){10 if(a.cnt==b.cnt) return a.numstr[cas].str[j])25 str[cas].cnt++;26 ... 阅读全文
posted @ 2014-01-03 23:16
symons
阅读(172)
评论(0)
推荐(0)
浙公网安备 33010602011771号