精华内容
下载资源
问答
  • sdfsd

    2008-06-02 09:28:16
  • SDFSD

    2004-08-12 17:12:00
  • 55325sdfsd

    2010-05-06 23:50:08
    11123423423423423aewrwerwer
  • asdfsdfsd

    2017-10-17 09:52:58
    #include #include #include using namespace std; int partaction(int *a,int left,int right) {  int tmp=a[left];  while(left  {  while(lefttmp)  {  right--;  } ... {

    #include <iostream>
    #include <map>
    #include <stack>
    using namespace std;
    int partaction(int *a,int left,int right)
    {
     int  tmp=a[left];
     while(left<right)
     {
      while(left<right&&a[right]>tmp)
      {
       right--;
      }
      if(right>left)
      {
       a[left++]=a[right];
      }
      while(left<right&&a[left]<tmp)
      {
       left++;
      }
      if(right>left)
      { 
       a[right--]=a[left];
      }
     }
     a[left]=tmp;
     return left;
     
    }
    void q_sort1(int *arr,int left,int right)
    {
     if(left>=right)
     {
      return ;
     }
     int mid=partaction(arr,left,right);
     q_sort1(arr,left,mid-1);
     q_sort1(arr,mid+1,right);

    }
    void q_sort(int *arr,int left,int right)
    {
     stack<pair<int,int> > s;
     s.push(make_pair(left,right));
     pair<int,int> tmp;
     while(!s.empty())
     {
      tmp=s.top();
      s.pop();
     
      if(tmp.first<tmp.second)
      {
       int mid=partaction(arr,tmp.first,tmp.second);
       s.push(make_pair<int,int>(tmp.first,mid-1));
       s.push(make_pair<int,int>(mid+1,tmp.second));
      } 
     }

    }
    int main()
    {
     int arr[10]={1,2,3,5};
     q_sort(arr,0,4);
     for(int i=0;i<4;i++)
     {
      printf("%d\n",arr[i]);
     }
     return 0;
    }

    展开全文
  • adf sdfsd

    2010-03-22 22:54:00
    sdfsdfsdfrtyhdfh dfhgfdhgsdfsdfrtyhdfh dfhgfdhgsdfsdfrtyhdfh dfhgfdhgsdfsdfrtyhdfh dfhgfdhgsdfsdfrtyhdfh dfhgfdhgsdfsdfrtyhdfh dfhgfdhgsdfsdfrtyhdfh dfhgfdhgsdfsdfrtyhdfh dfhgfdhgsdf

    sdf

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    sdfsdfrtyhdfh dfhgfdhg

    展开全文
  • 2sdfs142sdfsd

    千次阅读 2015-04-17 12:10:48
    fdsgdsf
  • SDF SDF SDF SDF SDF SDAF SDF GDF GDF DFG DFG DFG DG D
  • sdfsd
  • Test

    2019-09-18 07:07:06
    sdfsd
  • sdfsd
  • qwewqewqe

    2017-11-01 18:30:12
    sdfsd
  • sdfsdf

    2017-09-24 23:15:54
    sdfsd
  • fg

    2015-07-07 12:40:38
    sdfsd

空空如也

空空如也

1 2 3 4 5 ... 10
收藏数 192
精华内容 76
关键字:

sdfsd