poj_1007

 

/*
//ACM Poj 1007
//File: 1007.cpp
//Author: Kangzj
//Mail: Kangzj@mail.bnu.edu.cn
//Date: April 28, 2009
*/
#include
#include
using namespace std;
struct revNum
{
  int rvNums;
  int order;
};
int getReverseNum(string DNA, int n)
{
  int *count=new int[n];
  int all=0,i;
  for (i=0;i=0;i--)
  {
    for(int j=0;j>n>>m;
  string *DNA=new string[m];
  int count=0,temp,i;
  revNum *rvNum=new revNum[m];
  for(i=0;i>DNA[i];
    temp=getReverseNum(DNA[i],n);
    //插入排序
    if(count==0)
    {
      rvNum[0].rvNums=temp;
      rvNum[0].order=i;
      count++;
    }
    else
    {
            int j,flag=0;
      for(j=0;jj;k--)
          {
            rvNum[k]=rvNum[k-1];
          }
          rvNum[j].rvNums=temp;
          rvNum[j].order=i;
          count++;
          flag=1;
          break;
        }
      }//for(int j=0;j

Leave a Reply

Your email address will not be published. Required fields are marked *