PKU 1007
摘要:
题名:DNA排序题意:给定字符串长度、个数,计算每个字符串的逆序数,然后从大到小排列,有兴趣的可以去看下原题。计算字符串逆序数,然后排序,这里使用了快速排序算法,string释放的时候竟然有问题,直接字符数组吧。// 1007.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;class data{public: char s[51]; int c;};int partion(data a[],int p,int r){ int x = a[r].c; //通常... 阅读全文
posted @ 2013-12-19 16:34
alphaxz
阅读(588)
评论(0)
推荐(0)
浙公网安备 33010602011771号