锘??xml version="1.0" encoding="utf-8" standalone="yes"?>精品69视频一区二区三区,欧美日韩在线观看一区二区,欧美日韩国产电影http://www.shnenglu.com/heidaizx/category/5379.htmlzh-cnMon, 19 May 2008 20:22:29 GMTMon, 19 May 2008 20:22:29 GMT60闂暎鍒楁硶緇勭粐鐨勬暎鍒楄〃http://www.shnenglu.com/heidaizx/articles/37639.htmlheidaizxheidaizxSun, 02 Dec 2007 06:58:00 GMThttp://www.shnenglu.com/heidaizx/articles/37639.htmlhttp://www.shnenglu.com/heidaizx/comments/37639.htmlhttp://www.shnenglu.com/heidaizx/articles/37639.html#Feedback0http://www.shnenglu.com/heidaizx/comments/commentRss/37639.htmlhttp://www.shnenglu.com/heidaizx/services/trackbacks/37639.html
#include<iostream>
#include
<stdlib.h>
using namespace std;
const int DefaultSize=100;
enum KindOfStatus{Active,
Empty,Deleted};  //鍏冪礌鍒嗙被(媧誨姩/絀?/span>/鍒?
template
<class E,class K>
class HashTable
{
public:

    HashTable(
const int d,int sz=DefaultSize);
    ~HashTable(){delete []ht;delete []info;}
    bool Insert(
const E &e1);  //鍦ㄦ暎鍒楄〃涓彃鍏1
    bool Remove(
const K k1); //鍦ㄦ暎鍒楄〃涓垹闄?br>    E Search(const K k1,E& e1)const;//鍦ㄦ暎鍒楄〃鎼滅儲k1
    void makeEmpty();       
//緗暎鍒楄〃涓虹┖
private:
    
int divitor;          //鏁e垪琛ㄧ殑闄ゆ暟
    
int CurrentSize,TableSize;  //褰撳墠妗舵暟鍙婃渶澶ф《鏁?br>    E *ht;                     //鏁e垪琛ㄥ瓨鍌ㄦ暟緇?br>    KindOfStatus *info;        //鐘舵佹暟緇?br>    int FindPos(const K k1)const//鏁e垪鍑芥暟,璁$畻鍒濆妗跺彿

};

---------------hashing.cpp----------------------------
#include"hashing.h"
template
<class E,class K>
HashTable
<E,K>::HashTable(const int d,int sz)
{
    divitor
=d;
    TableSize
=sz;
    CurrentSize
=0;
    ht
=new E[TableSize];
    info
=new KindOfStatus[TableSize];
    
for(int i=0;i<TableSize;i++)
        info[i]
=Empty;
};

template
<class E,class K>
int HashTable<E,K>::FindPos(const K k1)const
{
    
int i=k1%divitor;//璁$畻鍒濆妗跺彿
    
int j=i;       //媯嫻嬩笅涓絀烘《涓嬫爣
    
do
    {    
        
if(info[j]==Empty||info[j]==Active&&ht[j]==k1)    return j;   //鎵懼埌
        j
=(j+1)%TableSize;            //褰撳仛寰幆琛ㄥ鐞嗭紝鎵句笅涓涓┖妗?br>    }while(j!=i);
    return j;
};

template
<class E,class K>
bool HashTable
<E,K>::Insert(const E& e1)
{
    K k1
=e1;       //閲嶈澆鍑芥暟::鎶藉彇鍑芥暟
    
int i=FindPos(k1); //鐢ㄦ暎鍒楀嚱鏁拌綆楁《鍙?br>    if(info[i]!=Active)
    {
        ht[i]
=e1;
        info[i]
=Active;
        CurrentSize
++;
        return 
true;
    }
    
if(info[i]==Active&&ht[i]==e1)
    {
        cout
<<"琛ㄤ腑宸叉湁鍏冪礌,涓嶈兘鎻掑叆!"<<endl;
        return 
false;
    }
    cout
<<"琛ㄥ凡婊?涓嶈兘鎻掑叆鏁版嵁!";
    return 
false;
};

template
<class E,class K>
bool HashTable
<E,K>::Remove(const K k1)
{
    
int i=FindPos(k1);
    
if(info[i]==Active)
    {
        info[i]
=Deleted;
        CurrentSize
--;
        return 
true;
    }
    
else return false;
};

template
<class E,class K>
E HashTable
<E,K>::Search(const K k1,E& e1)const
{
    
int i=FindPos(k1);
    
if(info[i]!=Active||ht[i]!=k1) return false;
    e1
=ht[i];
    return e1;
};

template
<class E,class K>
void HashTable
<E,K>::makeEmpty()
{
    
for(int i=0;i<TableSize;i++)
        info[i]
=Empty;
    CurrentSize
=0;
};
---------------main.cpp--------------------------

#include"hashing.cpp"
int menu()
{
    int choice;

    cout<<"               *************鏁e垪鍑芥暟鐨勫熀鏈搷浣?***********"<<endl<<endl;
    cout<<"                         鍦ㄦ暎鍒楄〃鎻掑叆鍏冪礌錛岃鎸?"<<endl;
    cout<<"                         閫昏緫鍒犻櫎鏁e垪琛ㄥ厓绱狅紝璇鋒寜2"<<endl;
    cout<<"                         鍦ㄦ暎鍒楄〃涓悳绱㈠叧閿爜鐨勫鹼紝璇鋒寜3"<<endl;
    cout<<"                         閫鍑猴紝璇鋒寜4"<<endl<<endl;
    cout<<"               *****************************************"<<endl<<endl;

    cout<<"                          璇烽夋嫨:";
    cin>>choice;
    return choice;
}

int main()
{
    HashTable<int,int> hash(2,10);
    bool exit=false;
    while(true)
    {
        int choice=menu();
        switch(choice)
        {
        case 1:
            int s;
            cout<<"                   璇瘋緭鍏ヨ鎻掑叆鍊煎叧閿爜:";
            cin>>s;
            cout<<"                   "<<hash.Insert(s)<<endl;break;
        case 2:
            int c;
            cout<<"                   璇瘋緭鍏ヨ杈撳嚭鍊煎叧閿爜:";
            cin>>c;
            cout<<"                   "<<hash.Remove(c)<<endl;break;
        case 3:
            int y;
            cout<<"                   璇瘋緭鍏ヨ鏌ヨ鍊肩殑鍏抽敭鐮?";
            cin>>y;
            int z;
            cout<<"                   "<<hash.Search(y,z)<<endl;break;
        case 4:
            exit=true;break;
            
        }
        system("pause");
        system("cls");
       
        if(exit==true)
            break;
    }
    return 0;
}





heidaizx 2007-12-02 14:58 鍙戣〃璇勮
]]>
浜屽弶鏍戠殑綆鍗曟搷浣?/title><link>http://www.shnenglu.com/heidaizx/articles/37638.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 02 Dec 2007 06:54:00 GMT</pubDate><guid>http://www.shnenglu.com/heidaizx/articles/37638.html</guid><wfw:comment>http://www.shnenglu.com/heidaizx/comments/37638.html</wfw:comment><comments>http://www.shnenglu.com/heidaizx/articles/37638.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/heidaizx/comments/commentRss/37638.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/heidaizx/services/trackbacks/37638.html</trackback:ping><description><![CDATA[ --------------------BinaryTree.h------------------------------- <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">#include</span><span style="color: #000000;"><</span><span style="color: #000000;">iostream</span><span style="color: #000000;">></span><span style="color: #000000;"><br>#include</span><span style="color: #000000;"><</span><span style="color: #000000;">stdlib.h</span><span style="color: #000000;">></span><span style="color: #000000;"><br>using namespace std;<br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>struct BinTreeNode<br>{<br>    T data;<br>    BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">leftChild,</span><span style="color: #000000;">*</span><span style="color: #000000;">rightChild;  </span><span style="color: #000000;">//</span><span style="color: #000000;">宸﹀彸瀛╁瓙鎸囬拡<br>    BinTreeNode():leftChild(</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">),rightChild(</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">){}<br>    BinTreeNode(T x,BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">l</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">,BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">r</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">):data(x),leftChild(l),rightChild(r){}<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>class BinaryTree<br>{<br></span><span style="color: #0000ff;">public</span><span style="color: #000000;">:<br>    <br></span><span style="color: #000000;">//</span><span style="color: #000000;">    BinaryTree():root(</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">){}<br>    BinaryTree():root(</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">){CreateBinTree(root);}<br>    void PreOrder(){PreOrder(root);}    </span><span style="color: #000000;">//</span><span style="color: #000000;">鍓嶅簭閬嶅巻<br>    void inOrder(){inOrder(root);}    </span><span style="color: #000000;">//</span><span style="color: #000000;">涓簭閬嶅巻<br>    void postOrder(){postOrder(root);}    </span><span style="color: #000000;">//</span><span style="color: #000000;">鍚庡簭閬嶅巻<br>    <br>    <br>protected:<br>    BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">root;                 </span><span style="color: #000000;">//</span><span style="color: #000000;">浜屽弶鏍戠殑鏍圭粨鐐規寚閽?br></span><span style="color: #000000;">//</span><span style="color: #000000;">    void Print(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">p);       </span><span style="color: #000000;">//</span><span style="color: #000000;">杈撳嚭浜屽弶鏍戞瘡涓粨鐐圭殑鍊?br>    void CreateBinTree(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree);</span><span style="color: #000000;">//</span><span style="color: #000000;">鍒╃敤浜屽弶鏍戝墠搴忛亶鍘嗙敓鎴愪簩鍙夋爲<br>    void PreOrder(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree);<br>    void inOrder(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree);    <br>    void postOrder(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree);    <br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;">                 <br>void BinaryTree</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::CreateBinTree(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree)<br>{<br>    char value;<br>    cin</span><span style="color: #000000;">>></span><span style="color: #000000;">value;<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(value</span><span style="color: #000000;">==</span><span style="color: #008000;">'</span><span style="color: #008000;">#') subTree=NULL;</span><span style="color: #008000;"><br></span><span style="color: #000000;">    </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br>    {<br>        subTree</span><span style="color: #000000;">=</span><span style="color: #0000ff;">new</span><span style="color: #000000;"> BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">(value);<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(subTree</span><span style="color: #000000;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>        {<br>            cerr</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">鍐呭瓨鍒嗛厤閿欒!</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>            </span><span style="color: #0000ff;">exit</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">);<br>        }<br>    <br>        CreateBinTree(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">leftChild);<br>        CreateBinTree(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">rightChild);<br>    }<br><br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;">   <br>void BinaryTree</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::PreOrder(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree)<br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(subTree!</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>        cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">data</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>        PreOrder(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">leftChild);<br>        PreOrder(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">rightChild);<br>    }<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;">   <br>void BinaryTree</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::inOrder(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree)<br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(subTree!</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>        <br>        inOrder(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">leftChild);<br>        cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">data</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>        inOrder(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">rightChild);<br>    }<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;">   <br>void BinaryTree</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::postOrder(BinTreeNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*&</span><span style="color: #000000;">subTree)<br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(subTree!</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>    <br>        postOrder(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">leftChild);<br>        postOrder(subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">rightChild);<br>        cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">subTree</span><span style="color: #000000;">-></span><span style="color: #000000;">data</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;"> </span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>    }<br>};<br><br><br><br></span></div> --------------------------main.cpp----------------------------------<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">#include</span><span style="color: #000000;">"</span><span style="color: #000000;">BinaryTree.h</span><span style="color: #000000;">"</span><span style="color: #000000;"><br></span><span style="color: #000000;"></span><span style="color: #000000;"><br><br></span><span style="color: #0000ff;">int</span><span style="color: #000000;"> menu()<br>{<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> choice</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">               ****************浜屽弶鏍戠粌涔?*****************</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br><br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">                          鍓嶅簭閬嶅巻杈撳嚭浜屽弶鏍戯紝璇鋒寜1:</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">                          涓簭閬嶅巻杈撳嚭浜屽弶鏍戯紝璇鋒寜2:</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">                          鍚庡簭閬嶅巻杈撳嚭浜屽弶鏍戯紝璇鋒寜3:</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">                          閫鍑鴻鎸?:</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">               ********************************************</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">               Please enter the number:</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>    cin</span><span style="color: #000000;">>></span><span style="color: #000000;">choice;<br>    return choice;<br>}<br></span><span style="color: #0000ff;">int</span><span style="color: #000000;"> main()<br>{<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">鍓嶅簭閬嶅巻寤虹珛浜屽弶鏍?</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    BinaryTree</span><span style="color: #000000;"><</span><span style="color: #000000;">char</span><span style="color: #000000;">></span><span style="color: #000000;"> tree;<br><br>    bool </span><span style="color: #0000ff;">exit</span><span style="color: #000000;">=</span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    <br>    </span><span style="color: #0000ff;">while</span><span style="color: #000000;">(</span><span style="color: #0000ff;">true</span><span style="color: #000000;">)<br>    {<br>        </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> choice</span><span style="color: #000000;">=</span><span style="color: #000000;">menu();<br>        <br>        switch(choice)<br>        {<br>            </span><span style="color: #0000ff;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">1</span><span style="color: #000000;">:<br>                tree.PreOrder();break;<br>            </span><span style="color: #0000ff;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">2</span><span style="color: #000000;">:<br>                tree.inOrder();break;<br>            </span><span style="color: #0000ff;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">3</span><span style="color: #000000;">:<br>                tree.postOrder();;break;<br><br>            </span><span style="color: #0000ff;">case</span><span style="color: #000000;"> </span><span style="color: #000000;">4</span><span style="color: #000000;">:</span><span style="color: #0000ff;">exit</span><span style="color: #000000;">=</span><span style="color: #0000ff;">true</span><span style="color: #000000;">;break;<br>            default:cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">           鎮ㄧ殑杈撳叆鏈夎錛岃閲嶆柊杈撳叆!</span><span style="color: #000000;">"</span><span style="color: #000000;">;break;<br>            <br>        }<br>        system(</span><span style="color: #000000;">"</span><span style="color: #000000;">pause</span><span style="color: #000000;">"</span><span style="color: #000000;">);             </span><span style="color: #000000;">//</span><span style="color: #000000;">鏆傚仠<br>        system(</span><span style="color: #000000;">"</span><span style="color: #000000;">cls</span><span style="color: #000000;">"</span><span style="color: #000000;">);               </span><span style="color: #000000;">//</span><span style="color: #000000;">娓呭睆<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(</span><span style="color: #0000ff;">exit</span><span style="color: #000000;">==</span><span style="color: #0000ff;">true</span><span style="color: #000000;">) break;<br>    }<br>    return </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>}</span></div> <br><br> <img src ="http://www.shnenglu.com/heidaizx/aggbug/37638.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/heidaizx/" target="_blank">heidaizx</a> 2007-12-02 14:54 <a href="http://www.shnenglu.com/heidaizx/articles/37638.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Josephus鐨勯摼琛ㄥ疄鐜?/title><link>http://www.shnenglu.com/heidaizx/articles/36868.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 18 Nov 2007 06:42:00 GMT</pubDate><guid>http://www.shnenglu.com/heidaizx/articles/36868.html</guid><wfw:comment>http://www.shnenglu.com/heidaizx/comments/36868.html</wfw:comment><comments>http://www.shnenglu.com/heidaizx/articles/36868.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/heidaizx/comments/commentRss/36868.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/heidaizx/services/trackbacks/36868.html</trackback:ping><description><![CDATA[-----------------------------Josephus.h---------------------------------------------<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">#include</span><span style="color: #000000;"><</span><span style="color: #000000;">iostream</span><span style="color: #000000;">></span><span style="color: #000000;"><br>#include</span><span style="color: #000000;"><</span><span style="color: #000000;">stdlib.h</span><span style="color: #000000;">></span><span style="color: #000000;"><br>using namespace std;<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>struct CircLinkNode<br>{<br>    T data;<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">link;<br>    CircLinkNode(CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #0000ff;">next</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">):link(</span><span style="color: #0000ff;">next</span><span style="color: #000000;">){}<br>    CircLinkNode(T d,CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">>*</span><span style="color: #0000ff;">next</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">):data(d),link(</span><span style="color: #0000ff;">next</span><span style="color: #000000;">){}<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>class CircList<br>{<br></span><span style="color: #0000ff;">public</span><span style="color: #000000;">:<br><br>    CircList(){first</span><span style="color: #000000;">=</span><span style="color: #0000ff;">new</span><span style="color: #000000;"> CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">),first</span><span style="color: #000000;">-></span><span style="color: #000000;">link</span><span style="color: #000000;">=</span><span style="color: #000000;">first;}</span><span style="color: #000000;">//</span><span style="color: #000000;">瀹氫箟涓哄驚鐜摼琛?br>    ~CircList(){}<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">getHead()</span><span style="color: #0000ff;">const</span><span style="color: #000000;">{return first;}<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">Locate(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> </span><span style="color: #000000;">&</span><span style="color: #000000;">i);<br>    bool Insert(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> </span><span style="color: #000000;">&</span><span style="color: #000000;">i);<br></span><span style="color: #0000ff;">private</span><span style="color: #000000;">:<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">first;<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">CircList</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::Locate(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> </span><span style="color: #000000;">&</span><span style="color: #000000;">i)<br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(i</span><span style="color: #000000;"><</span><span style="color: #000000;">0</span><span style="color: #000000;">) return </span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">;<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">current</span><span style="color: #000000;">=</span><span style="color: #000000;">first;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> k</span><span style="color: #000000;">=</span><span style="color: #000000;">2</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">while</span><span style="color: #000000;">(current!</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">&&</span><span style="color: #000000;">k</span><span style="color: #000000;"><</span><span style="color: #000000;">i)<br>    {<br>        current</span><span style="color: #000000;">=</span><span style="color: #000000;">current</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>        k</span><span style="color: #000000;">++</span><span style="color: #000000;">;<br>    }<br>    return current;<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>bool CircList</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::Insert(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> </span><span style="color: #000000;">&</span><span style="color: #000000;">i)<br>{<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">current</span><span style="color: #000000;">=</span><span style="color: #000000;">Locate(i);<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(current</span><span style="color: #000000;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">) return </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">newNode</span><span style="color: #000000;">=</span><span style="color: #0000ff;">new</span><span style="color: #000000;"> CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">(i);<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(newNode</span><span style="color: #000000;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>        cerr</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">瀛樺偍鍒嗛厤閿欒!</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>        </span><span style="color: #0000ff;">exit</span><span style="color: #000000;">(</span><span style="color: #000000;">1</span><span style="color: #000000;">);<br>    }<br>    newNode</span><span style="color: #000000;">-></span><span style="color: #000000;">link</span><span style="color: #000000;">=</span><span style="color: #000000;">first;<br>    current</span><span style="color: #000000;">-></span><span style="color: #000000;">link</span><span style="color: #000000;">=</span><span style="color: #000000;">newNode;<br><br>    return </span><span style="color: #0000ff;">true</span><span style="color: #000000;">;<br>};</span></div> -------------------------------main.cpp-----------------------------------<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">#include</span><span style="color: #000000;">"</span><span style="color: #000000;">CircList.h</span><span style="color: #000000;">"</span><span style="color: #000000;"><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>void Josephus(CircList</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">>&</span><span style="color: #000000;">Js ,</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> n,</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> m)<br>{<br>    CircLinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">p</span><span style="color: #000000;">=</span><span style="color: #000000;">Js.getHead(),</span><span style="color: #000000;">*</span><span style="color: #000000;">pre</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i,j;<br>    </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i</span><span style="color: #000000;"><</span><span style="color: #000000;">n</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>    {<br>        </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(j</span><span style="color: #000000;">=</span><span style="color: #000000;">1</span><span style="color: #000000;">;j</span><span style="color: #000000;"><</span><span style="color: #000000;">m;j</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>        {<br>            pre</span><span style="color: #000000;">=</span><span style="color: #000000;">p;<br>            p</span><span style="color: #000000;">=</span><span style="color: #000000;">p</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>        }<br>        cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">鍑哄垪鐨勪漢鏄?/span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">p</span><span style="color: #000000;">-></span><span style="color: #000000;">data</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>        pre</span><span style="color: #000000;">-></span><span style="color: #000000;">link</span><span style="color: #000000;">=</span><span style="color: #000000;">p</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>        delete p;<br>        p</span><span style="color: #000000;">=</span><span style="color: #000000;">pre</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>    }<br>};<br><br></span><span style="color: #0000ff;">int</span><span style="color: #000000;"> main()<br>{<br>    CircList</span><span style="color: #000000;"><</span><span style="color: #0000ff;">int</span><span style="color: #000000;">></span><span style="color: #000000;"> clist;<br><br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i,n,m;<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">杈撳叆娓告垙浜烘暟鍜屾姤鏁拌呴棿闅? </span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>    cin</span><span style="color: #000000;">>></span><span style="color: #000000;">n</span><span style="color: #000000;">>></span><span style="color: #000000;">m;<br>    </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(i</span><span style="color: #000000;">=</span><span style="color: #000000;">2</span><span style="color: #000000;">;i</span><span style="color: #000000;"><=</span><span style="color: #000000;">n;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>        clist.Insert(i);<br>    Josephus(clist,n,m);<br>    return </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>}</span></div> 鍒氬鏁版嵁緇撴瀯灝卞簲璇ュ疄鐜扮殑紼嬪簭錛屽懙鍛碉紝鍒扮幇鍦ㄦ墠鍘誨仛.<br><br>涓嬮潰鏄互鍓嶆病瀛︽暟鎹粨鏋勪箣鍓嶆墍鍐欑殑浠g爜<br> <div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">#include</span><span style="color: #000000;"><</span><span style="color: #000000;">iostream</span><span style="color: #000000;">></span><span style="color: #000000;"><br>using namespace std;<br></span><span style="color: #0000ff;">int</span><span style="color: #000000;"> main()<br>{<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> count</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> s</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;</span><span style="color: #000000;">//</span><span style="color: #000000;">璁板綍閫鍑虹殑浜虹殑涓暟<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> N;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> key;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> a[</span><span style="color: #000000;">100</span><span style="color: #000000;">];<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">娓告垙浜烘暟鍜屾暟瀛楀垎鍒槸:</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>    cin</span><span style="color: #000000;">>></span><span style="color: #000000;">N</span><span style="color: #000000;">>></span><span style="color: #000000;">key;<br>    </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i</span><span style="color: #000000;"><</span><span style="color: #000000;">N;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>        a[i]</span><span style="color: #000000;">=</span><span style="color: #000000;">i</span><span style="color: #000000;">+</span><span style="color: #000000;">1</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i</span><span style="color: #000000;"><</span><span style="color: #000000;">N;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>    {<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(a[i]</span><span style="color: #000000;">==-</span><span style="color: #000000;">1</span><span style="color: #000000;">)<br>        {<br>            </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(i</span><span style="color: #000000;">==</span><span style="color: #000000;">N</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">)</span><span style="color: #000000;">//</span><span style="color: #000000;">闃叉continue浣垮驚鐜鍑?br>                i</span><span style="color: #000000;">=-</span><span style="color: #000000;">1</span><span style="color: #000000;">;<br>            continue;<br>        }<br>        count</span><span style="color: #000000;">++</span><span style="color: #000000;">;<br>    <br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(count</span><span style="color: #000000;">==</span><span style="color: #000000;">key)<br>        {<br>            a[i]</span><span style="color: #000000;">=-</span><span style="color: #000000;">1</span><span style="color: #000000;">;<br>            s</span><span style="color: #000000;">++</span><span style="color: #000000;">;<br>            count</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>        }<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(i</span><span style="color: #000000;">==</span><span style="color: #000000;">N</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">)<br>            i</span><span style="color: #000000;">=-</span><span style="color: #000000;">1</span><span style="color: #000000;">;<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(s</span><span style="color: #000000;">==</span><span style="color: #000000;">N</span><span style="color: #000000;">-</span><span style="color: #000000;">1</span><span style="color: #000000;">)<br>            break;<br>        <br>    }<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">鐣欎笅鐨勪漢鏄?</span><span style="color: #000000;">"</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;i</span><span style="color: #000000;"><</span><span style="color: #000000;">N;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(a[i]!</span><span style="color: #000000;">=-</span><span style="color: #000000;">1</span><span style="color: #000000;">)<br>            cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">a[i];<br>    cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    <br>    return </span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>}</span></div> <br><br> <img src ="http://www.shnenglu.com/heidaizx/aggbug/36868.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/heidaizx/" target="_blank">heidaizx</a> 2007-11-18 14:42 <a href="http://www.shnenglu.com/heidaizx/articles/36868.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>闃熷垪瀹炵幇鏉ㄨ緣涓夎褰㈢畻娉曪紙闈為噾瀛楀褰級寰呮敼榪?/title><link>http://www.shnenglu.com/heidaizx/articles/35343.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 28 Oct 2007 07:28:00 GMT</pubDate><guid>http://www.shnenglu.com/heidaizx/articles/35343.html</guid><wfw:comment>http://www.shnenglu.com/heidaizx/comments/35343.html</wfw:comment><comments>http://www.shnenglu.com/heidaizx/articles/35343.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/heidaizx/comments/commentRss/35343.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/heidaizx/services/trackbacks/35343.html</trackback:ping><description><![CDATA[<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">#include</span><span style="color: #000000;">"</span><span style="color: #000000;">LinkedQueue.h</span><span style="color: #000000;">"</span><span style="color: #000000;"><br>void YANGVI(</span><span style="color: #0000ff;">int</span><span style="color: #000000;"> n)<br>{<br>    LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #0000ff;">int</span><span style="color: #000000;">></span><span style="color: #000000;"> q;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> k;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i</span><span style="color: #000000;">=</span><span style="color: #000000;">1</span><span style="color: #000000;">,j,s</span><span style="color: #000000;">=</span><span style="color: #000000;">k</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">,t,u;         </span><span style="color: #000000;">//</span><span style="color: #000000;">璁$畻涓嬩竴琛岀郴鏁版椂鐢ㄥ埌鐨勫伐浣滃崟鍏?br>    q.EnQueue(i);q.EnQueue(i);   </span><span style="color: #000000;">//</span><span style="color: #000000;">棰勫厛鏀懼叆絎竴琛岀殑涓や釜緋繪暟<br>    </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(i</span><span style="color: #000000;">=</span><span style="color: #000000;">1</span><span style="color: #000000;">;i</span><span style="color: #000000;"><=</span><span style="color: #000000;">n;i</span><span style="color: #000000;">++</span><span style="color: #000000;">)<br>    {<br>        cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;              </span><span style="color: #000000;">//</span><span style="color: #000000;">鎹㈣<br>        q.EnQueue(k);             </span><span style="color: #000000;">//</span><span style="color: #000000;">鍚勮闂存彃鍏ヤ竴涓?<br>        </span><span style="color: #0000ff;">for</span><span style="color: #000000;">(j</span><span style="color: #000000;">=</span><span style="color: #000000;">1</span><span style="color: #000000;">;j</span><span style="color: #000000;"><=</span><span style="color: #000000;">i</span><span style="color: #000000;">+</span><span style="color: #000000;">2</span><span style="color: #000000;">;j</span><span style="color: #000000;">++</span><span style="color: #000000;">)      </span><span style="color: #000000;">//</span><span style="color: #000000;">澶勭悊絎琲琛岀殑i</span><span style="color: #000000;">+</span><span style="color: #000000;">2涓郴鏁?鍖呮嫭涓涓?)<br>        {<br>            q.DeQueue(t);        </span><span style="color: #000000;">//</span><span style="color: #000000;">璇誨彇涓涓郴鏁?br>            u</span><span style="color: #000000;">=</span><span style="color: #000000;">s</span><span style="color: #000000;">+</span><span style="color: #000000;">t;              </span><span style="color: #000000;">//</span><span style="color: #000000;">璁$畻涓嬩竴琛岀殑緋繪暟<br>            q.EnQueue(u);        </span><span style="color: #000000;">//</span><span style="color: #000000;">榪涢槦鍒?br>            s</span><span style="color: #000000;">=</span><span style="color: #000000;">t;                </span><span style="color: #000000;">//</span><span style="color: #000000;">姣忔璁板綍鍒氭墠鍑洪槦鍒楃殑鍊鹼紝渚夸簬涓庝笅嬈″嚭闃熷垪鐨勫肩浉鍔?br>            </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(j!</span><span style="color: #000000;">=</span><span style="color: #000000;">2</span><span style="color: #000000;">+</span><span style="color: #000000;">i) cout</span><span style="color: #000000;"><<</span><span style="color: #000000;">s</span><span style="color: #000000;"><<</span><span style="color: #008000;">'</span><span style="color: #008000;"> ';//鎵撳嵃涓涓郴鏁幫紝絎琲+2涓槸0</span><span style="color: #008000;"><br></span><span style="color: #000000;">        }<br>    }<br>}</span></div> <br><img src ="http://www.shnenglu.com/heidaizx/aggbug/35343.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-28 15:28 <a href="http://www.shnenglu.com/heidaizx/articles/35343.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>寰幆闃熷垪鐨勯摼琛ㄨ〃紺?/title><link>http://www.shnenglu.com/heidaizx/articles/35337.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 28 Oct 2007 03:39:00 GMT</pubDate><guid>http://www.shnenglu.com/heidaizx/articles/35337.html</guid><wfw:comment>http://www.shnenglu.com/heidaizx/comments/35337.html</wfw:comment><comments>http://www.shnenglu.com/heidaizx/articles/35337.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/heidaizx/comments/commentRss/35337.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/heidaizx/services/trackbacks/35337.html</trackback:ping><description><![CDATA[<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">#include</span><span style="color: #000000;">"</span><span style="color: #000000;">LinkedList.h</span><span style="color: #000000;">"</span><span style="color: #000000;"><br>#include</span><span style="color: #000000;">"</span><span style="color: #000000;">Queue.h</span><span style="color: #000000;">"</span><span style="color: #000000;"><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>class LinkedQueue<br>{<br></span><span style="color: #0000ff;">public</span><span style="color: #000000;">:<br>    LinkedQueue():rear(</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">),front(</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">){}<br>    ~LinkedQueue(){makeEmpty();}<br>    bool EnQueue(</span><span style="color: #0000ff;">const</span><span style="color: #000000;"> T</span><span style="color: #000000;">&</span><span style="color: #000000;"> x);<br>    bool DeQueue(T</span><span style="color: #000000;">&</span><span style="color: #000000;"> x);<br>    bool getFront(T</span><span style="color: #000000;">&</span><span style="color: #000000;"> x)</span><span style="color: #0000ff;">const</span><span style="color: #000000;">;<br>    void makeEmpty();<br>    bool </span><span style="color: #0000ff;">IsEmpty</span><span style="color: #000000;">()</span><span style="color: #0000ff;">const</span><span style="color: #000000;">{return(front</span><span style="color: #000000;">==</span><span style="color: #000000;">rear)?</span><span style="color: #0000ff;">true</span><span style="color: #000000;">:</span><span style="color: #0000ff;">false</span><span style="color: #000000;">;}<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> getSize()</span><span style="color: #0000ff;">const</span><span style="color: #000000;">;<br></span><span style="color: #000000;">//</span><span style="color: #000000;">    bool IsFull()</span><span style="color: #0000ff;">const</span><span style="color: #000000;">{return((rear</span><span style="color: #000000;">+</span><span style="color: #000000;">1</span><span style="color: #000000;">)%maxSize</span><span style="color: #000000;">==</span><span style="color: #000000;">front)?</span><span style="color: #0000ff;">true</span><span style="color: #000000;">:</span><span style="color: #0000ff;">false</span><span style="color: #000000;">;}<br>    friend ostream</span><span style="color: #000000;">&</span><span style="color: #000000;"> operator</span><span style="color: #000000;"><<</span><span style="color: #000000;">(ostream</span><span style="color: #000000;">&</span><span style="color: #000000;"> os,LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">>&</span><span style="color: #000000;"> Q);  <br>protected:<br>    LinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">front, </span><span style="color: #000000;">*</span><span style="color: #000000;">rear;<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>void LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::makeEmpty()<br>{<br>    LinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">p;<br>    </span><span style="color: #0000ff;">while</span><span style="color: #000000;">(front!</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>        p</span><span style="color: #000000;">=</span><span style="color: #000000;">front;<br>        front</span><span style="color: #000000;">=</span><span style="color: #000000;">front</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>        delete p;<br>    }<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>bool LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::EnQueue(</span><span style="color: #0000ff;">const</span><span style="color: #000000;"> T</span><span style="color: #000000;">&</span><span style="color: #000000;"> x)<br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(front</span><span style="color: #000000;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>        front</span><span style="color: #000000;">=</span><span style="color: #000000;">rear</span><span style="color: #000000;">=</span><span style="color: #0000ff;">new</span><span style="color: #000000;"> LinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">(x);</span><span style="color: #000000;">//</span><span style="color: #000000;">絀洪槦鍒楁椂錛屾柊緇撶偣鎴愪負闃熷垪鐨勭涓涓粨鐐癸紝鏃㈡槸瀵瑰ご涔熸槸闃熷熬<br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(front</span><span style="color: #000000;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">) return </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    }<br>    </span><span style="color: #0000ff;">else</span><span style="color: #000000;"><br>    {<br>        rear</span><span style="color: #000000;">-></span><span style="color: #000000;">link</span><span style="color: #000000;">=</span><span style="color: #0000ff;">new</span><span style="color: #000000;"> LinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">(x);</span><span style="color: #000000;">//</span><span style="color: #000000;">闈炵┖鏃跺湪閾懼熬榪藉姞鏂扮殑緇撶偣騫舵洿鏂伴槦灝炬寚閽?br>        </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(rear</span><span style="color: #000000;">-></span><span style="color: #000000;">link</span><span style="color: #000000;">==</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">) return </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>        rear</span><span style="color: #000000;">=</span><span style="color: #000000;">rear</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>    }<br>    return </span><span style="color: #0000ff;">true</span><span style="color: #000000;">;<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>bool LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::DeQueue(T</span><span style="color: #000000;">&</span><span style="color: #000000;"> x)<br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(</span><span style="color: #0000ff;">IsEmpty</span><span style="color: #000000;">()</span><span style="color: #000000;">==</span><span style="color: #0000ff;">true</span><span style="color: #000000;">) return </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    LinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">p</span><span style="color: #000000;">=</span><span style="color: #000000;">front;<br>    x</span><span style="color: #000000;">=</span><span style="color: #000000;">front</span><span style="color: #000000;">-></span><span style="color: #000000;">data;<br>    front</span><span style="color: #000000;">=</span><span style="color: #000000;">front</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>    delete p;<br>    return </span><span style="color: #0000ff;">true</span><span style="color: #000000;">;<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>bool LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::getFront(T</span><span style="color: #000000;">&</span><span style="color: #000000;"> x)</span><span style="color: #0000ff;">const</span><span style="color: #000000;"><br>{<br>    </span><span style="color: #0000ff;">if</span><span style="color: #000000;">(</span><span style="color: #0000ff;">IsEmpty</span><span style="color: #000000;">()</span><span style="color: #000000;">==</span><span style="color: #0000ff;">true</span><span style="color: #000000;">) return </span><span style="color: #0000ff;">false</span><span style="color: #000000;">;<br>    x</span><span style="color: #000000;">=</span><span style="color: #000000;">front</span><span style="color: #000000;">-></span><span style="color: #000000;">data;<br>    return </span><span style="color: #0000ff;">true</span><span style="color: #000000;">;<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br></span><span style="color: #0000ff;">int</span><span style="color: #000000;"> LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;">::getSize()</span><span style="color: #0000ff;">const</span><span style="color: #000000;"><br>{<br>    LinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">p</span><span style="color: #000000;">=</span><span style="color: #000000;">front;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> k</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">while</span><span style="color: #000000;">(p!</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>        p</span><span style="color: #000000;">=</span><span style="color: #000000;">p</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>        k</span><span style="color: #000000;">++</span><span style="color: #000000;">;<br>    }<br>    return k;<br>};<br><br>template</span><span style="color: #000000;"><</span><span style="color: #000000;">class T</span><span style="color: #000000;">></span><span style="color: #000000;"><br>ostream</span><span style="color: #000000;">&</span><span style="color: #000000;"> operator</span><span style="color: #000000;"><<</span><span style="color: #000000;">(ostream</span><span style="color: #000000;">&</span><span style="color: #000000;"> os,LinkedQueue</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">>&</span><span style="color: #000000;"> Q)<br>{<br>    os</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">闃熷垪涓殑鍏冪礌涓暟鏈?/span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">Q.getSize()</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>    LinkNode</span><span style="color: #000000;"><</span><span style="color: #000000;">T</span><span style="color: #000000;">></span><span style="color: #000000;"> </span><span style="color: #000000;">*</span><span style="color: #000000;">p</span><span style="color: #000000;">=</span><span style="color: #000000;">Q.front;<br>    </span><span style="color: #0000ff;">int</span><span style="color: #000000;"> i</span><span style="color: #000000;">=</span><span style="color: #000000;">0</span><span style="color: #000000;">;<br>    </span><span style="color: #0000ff;">while</span><span style="color: #000000;">(p!</span><span style="color: #000000;">=</span><span style="color: #0000ff;">NULL</span><span style="color: #000000;">)<br>    {<br>        os</span><span style="color: #000000;"><<++</span><span style="color: #000000;">i</span><span style="color: #000000;"><<</span><span style="color: #000000;">"</span><span style="color: #000000;">:</span><span style="color: #000000;">"</span><span style="color: #000000;"><<</span><span style="color: #000000;">p</span><span style="color: #000000;">-></span><span style="color: #000000;">data</span><span style="color: #000000;"><<</span><span style="color: #000000;">endl;<br>        p</span><span style="color: #000000;">=</span><span style="color: #000000;">p</span><span style="color: #000000;">-></span><span style="color: #000000;">link;<br>    }<br>    return os;<br>}<br></span></div> <br><img src ="http://www.shnenglu.com/heidaizx/aggbug/35337.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-28 11:39 <a href="http://www.shnenglu.com/heidaizx/articles/35337.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>寰幆闃熷垪鐨勬暟緇勮〃紺哄嚱鏁扮殑瀹炵幇http://www.shnenglu.com/heidaizx/articles/35335.htmlheidaizxheidaizxSun, 28 Oct 2007 02:41:00 GMThttp://www.shnenglu.com/heidaizx/articles/35335.htmlhttp://www.shnenglu.com/heidaizx/comments/35335.htmlhttp://www.shnenglu.com/heidaizx/articles/35335.html#Feedback0http://www.shnenglu.com/heidaizx/comments/commentRss/35335.htmlhttp://www.shnenglu.com/heidaizx/services/trackbacks/35335.html#include<assert.h>
#include
<iostream.h>
#include
<stdlib.h>
#include
"Queue.h"
template
<class T>
class SeqQueue
{
public:
    SeqQueue(
int sz=10);
    ~SeqQueue(){delete[]elements;}
    bool EnQueue(
const T& x);
    bool DeQueue(T
& x);
    bool getFront(T
& x);
    void makeEmpty(){front
=rear=0;}
    bool 
IsEmpty()const{return(front==rear)?true:false;}
    bool IsFull()
const{return((rear+1)%maxSize==front)?true:false;}
    friend ostream
& operator<<(ostream& os,SeqQueue<T>& Q);     //杈撳嚭閲嶈澆
protected:
    
int rear,front;              //闃熷熬鎸囬拡涓庡澶存寚閽?br>    T *elements;                 
    
int maxSize;                //闃熷垪鏈澶у彲瀹圭撼涓暟
};

template
<class T>
SeqQueue
<T>::SeqQueue(int sz):front(0),rear(0),maxSize(sz)
{
    elements
=new T[maxSize];
    assert(elements!
=NULL);
};

template
<class T>
bool SeqQueue
<T>::EnQueue(const T& x)
{
    
if(IsFull()==true) return false;          //闃熷垪婊★紝鎻掑叆澶辮觸
    elements[rear]
=x;                         //鎸夌収闃熷熬鎸囬拡鎸囩ず鎻掑叆浣嶇疆
    rear
=(rear+1)%maxSize;                    //闃熷熬鎸囬拡+1
    return 
true;
};

template
<class T>
bool SeqQueue
<T>::DeQueue(T& x)
{
    
if(IsEmpty()==true) return false;
    x
=elements[front];
    front
=(front+1)%maxSize;
    return 
true;

}

template
<class T>
bool SeqQueue
<T>::getFront(T& x)
{
    
if(IsEmpty()==true) return false;
    x
=elements[front];
    return 
true;
};

template
<class T>
ostream
& operator<<(ostream& os,SeqQueue<T>& Q)
{
    os
<<"front="<<Q.front<<",rear="<<Q.rear<<endl;
    
for(int i=Q.front;i!=Q.rear;i=(i+1)%maxSize)
        os
<<i<<":"<<Q.elements[i]<<endl;
    return os;
}



heidaizx 2007-10-28 10:41 鍙戣〃璇勮
]]>
鏍堝疄鐜癴ib綆楁硶http://www.shnenglu.com/heidaizx/articles/35334.htmlheidaizxheidaizxSun, 28 Oct 2007 02:39:00 GMThttp://www.shnenglu.com/heidaizx/articles/35334.htmlhttp://www.shnenglu.com/heidaizx/comments/35334.htmlhttp://www.shnenglu.com/heidaizx/articles/35334.html#Feedback0http://www.shnenglu.com/heidaizx/comments/commentRss/35334.htmlhttp://www.shnenglu.com/heidaizx/services/trackbacks/35334.html//FIB鏁板垪鐨勬爤瀹炵幇//
///////////////////
#include"LinkedStack.h"
#include<stdlib.h>
struct Node
{
    long n;
    int tag;
};

long Fibnacci(long n)                           
{                                           
    LinkedStack<Node> S;                   
    Node *w=new Node;    //鍒嗛厤鍔ㄦ佸唴瀛橈紝濡傛灉涓嶅垎閰嶅垯紼嬪簭閿欒                   
    if(w==NULL)                               
    {                                       
        cerr<<"鍒嗛厤鍐呭瓨澶辮!"<<endl;   
        exit(1);                           
    }                                       
    long sum=0;                               
    do
    {
        while(n>1)          //涓嶆柇鐨勫皢緇撴瀯浣撳帇鍏ユ爤
        {
            w->n=n;
            w->tag=1;
            S.Push(*w);
            n--;
        }
        sum=sum+n;
   
   
        while(S.IsEmpty()==false)
        {
            S.Pop(*w);
            if(w->tag==1)
            {
                w->tag=2;
                S.Push(*w);
                n=w->n-2;
                break;
            }
        }
    }while(S.IsEmpty()==false);
    return sum;
}


heidaizx 2007-10-28 10:39 鍙戣〃璇勮
]]>
姹夎濉旈棶棰?/title><link>http://www.shnenglu.com/heidaizx/articles/34279.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Mon, 15 Oct 2007 11:52:00 GMT</pubDate><guid>http://www.shnenglu.com/heidaizx/articles/34279.html</guid><wfw:comment>http://www.shnenglu.com/heidaizx/comments/34279.html</wfw:comment><comments>http://www.shnenglu.com/heidaizx/articles/34279.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/heidaizx/comments/commentRss/34279.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/heidaizx/services/trackbacks/34279.html</trackback:ping><description><![CDATA[緇堜簬鎼炴竻浜嗗畠鐨勮繃紼嬶紝浣嗘槸榪樻槸涓嶇煡閬撳叾涓紪鍐欑殑濂ュ錛屽啀浠旂粏鎯蟲兂涓轟粈涔堣榪欐牱<br> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #0000ff">string</span><span style="COLOR: #000000">.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>void Hanoi(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n,char A,char B,char C);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>void main()<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    Hanoi(</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">,</span><span style="COLOR: #008000">'</span><span style="COLOR: #008000">A','B','C');</span><span style="COLOR: #008000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #000000">}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>void Hanoi(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> n,char A,char B,char C)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(n</span><span style="COLOR: #000000">==</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Move top disk from peg </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">A</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> to peg </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">C</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">else</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    {<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        Hanoi(n</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,A,C,B);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Move top disk from peg </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">A</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> to peg </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">C</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        Hanoi(n</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,B,A,C);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    }<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}</span></div> <img src ="http://www.shnenglu.com/heidaizx/aggbug/34279.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-15 19:52 <a href="http://www.shnenglu.com/heidaizx/articles/34279.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鎷彿鍖歸厤闂http://www.shnenglu.com/heidaizx/articles/34217.htmlheidaizxheidaizxSun, 14 Oct 2007 09:01:00 GMThttp://www.shnenglu.com/heidaizx/articles/34217.htmlhttp://www.shnenglu.com/heidaizx/comments/34217.htmlhttp://www.shnenglu.com/heidaizx/articles/34217.html#Feedback0http://www.shnenglu.com/heidaizx/comments/commentRss/34217.htmlhttp://www.shnenglu.com/heidaizx/services/trackbacks/34217.html

void PrintMatchedPairs(char 
*expression)//////////////////////////////////////////////////////////鎷彿鍖歸厤綆楁硶
{
    linkedStack s;
    
int j,length=strlen(expression);
    
for(int i=1;i<=length;i++)
    {
        
if(expression[i-1]=='(') s.Push(i);
        else if(expression[i-1]==')')
        {
            
if(s.Pop(j)==true)
                cout
<<j<<"涓?/span>"<<i<<"鍖歸厤"<<endl;
            
else 
                cout
<<"娌℃湁涓庣"<<i<<"涓嫭鍙峰尮閰嶇殑宸︽嫭鍙?"<<endl;
        }
    }
    
while(s.isEmpty()==false)
    {
        s.Pop(j);
        cout
<<"娌℃湁涓庣"<<j<<"涓乏鎷彿鐩稿尮閰嶇殑鍙蟲嫭鍙?"<<endl;
    }
}





鍒漢鍐欑殑浠g爜
 
char stack[200];/*   鏍堢┖闂?nbsp;  */  
int  size=0;    /*   鍏ユ爤涓暟   */  
int PrintMatchedPairs(char *expression)
{
    
int i;
    
for(i=0;i<strlen(expression);i++)  
    {  
        
char c=expression[i];  

   
        
if(c=='('||c=='['||c=='{')   /*   閬囧埌宸︽嫭鍙?nbsp;  */ 
        {  
            stack[size]
=c;   /*   stack   push   */  
            size
++;  
        }  
         
        
else if(c==')')  /*   閬囧埌鍙蟲嫭鍙?nbsp;  */ 
        {  
         
            
if(size==0||stack[size-1]!='(')  /*   媯鏌?nbsp;  stack   鏈鍚庝竴涓槸鍚︽槸   '('   */  
            {
                size
=0;
                
return 0;
                
            }
            
else  
                size
--;   /*   stack   pop   */  
        }  
        
else if(c==']')  
        {  
                  
            
if(size==0||stack[size-1]!='[')  /*   媯鏌?nbsp;  stack   鏈鍚庝竴涓槸鍚︽槸   '['   */  
            {
                size
=0;
                
return 0
                
            }
            
else  
                size
--;   /*   stack   pop   */  
        }  
        
else if(c=='}')  
        {  
                 
            
if(size==0||stack[size-1]!='{')   /*   媯鏌?nbsp;  stack   鏈鍚庝竴涓槸鍚︽槸   '{'   */  
            {
                size
=0;
                
return 0;
                
            }
            
else  
                size
--;   /*   stack   pop   */  
        }  
    }  
   
    
if(size==0)  
        
return 1;  
    
else  
    {
    
        size
=0;
        
return 0;
    }

}


heidaizx 2007-10-14 17:01 鍙戣〃璇勮
]]>
鏍堢殑綆鍗曞疄鐜?/title><link>http://www.shnenglu.com/heidaizx/articles/34214.html</link><dc:creator>heidaizx</dc:creator><author>heidaizx</author><pubDate>Sun, 14 Oct 2007 07:17:00 GMT</pubDate><guid>http://www.shnenglu.com/heidaizx/articles/34214.html</guid><wfw:comment>http://www.shnenglu.com/heidaizx/comments/34214.html</wfw:comment><comments>http://www.shnenglu.com/heidaizx/articles/34214.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/heidaizx/comments/commentRss/34214.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/heidaizx/services/trackbacks/34214.html</trackback:ping><description><![CDATA[<p> </p> <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><span style="COLOR: #000000">#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">iostream</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>#include</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">assert.h</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>using namespace std;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>struct linkNode<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> data;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">link;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode(linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">pre</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">):link(pre){}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> d,linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">pre</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">):link(pre),data(d){}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>};<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>class linkedStack<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkedStack():top(</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">){}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    ~linkedStack(){makeEmpty();};<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    void Push(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">x);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    bool Pop(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">x);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> getTop(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">x)</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    bool </span><span style="COLOR: #0000ff">isEmpty</span><span style="COLOR: #000000">()</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> {return (top</span><span style="COLOR: #000000">==</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">)?</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">:</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">;}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> getSize()</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    void makeEmpty();<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    void output();<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">private</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">top;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>};<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>void linkedStack::makeEmpty()<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">p;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(top!</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    {<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        p</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">top;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        top</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">top</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">link;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        delete p;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    }<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>void linkedStack::Push(</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">x)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    top</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000"> linkNode(x,top);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    assert(top!</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">);<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>bool linkedStack::Pop(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">x)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">isEmpty</span><span style="COLOR: #000000">()</span><span style="COLOR: #000000">==</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">) return </span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">p</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">top;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    top</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">top</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">link;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    x</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">p</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">data;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    delete p;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    return </span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> linkedStack::getTop(</span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">&</span><span style="COLOR: #000000">x)</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">isEmpty</span><span style="COLOR: #000000">()</span><span style="COLOR: #000000">==</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">) return </span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    x</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">top</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">data;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    return x;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> linkedStack::getSize()</span><span style="COLOR: #0000ff">const</span><span style="COLOR: #000000"><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">p</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">top;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> i</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(p!</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    {<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        p</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">p</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">link;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        i</span><span style="COLOR: #000000">++</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    }<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    return i;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>void linkedStack::output()<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkNode </span><span style="COLOR: #000000">*</span><span style="COLOR: #000000">p</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">top;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(p!</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">NULL</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    {<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">p</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">data</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        p</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">p</span><span style="COLOR: #000000">-></span><span style="COLOR: #000000">link;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    }<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> menu()<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> choice;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">*************閾懼紡鏍堢殑鍩烘湰鎿嶄綔************</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">鎻掑叆緇撶偣錛岃鎸?</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">鍒犻櫎緇撶偣錛岃鎸?</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">榪斿洖鏍堥《鍏冪礌鐨勫鹼紝璇鋒寜3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">姹傛爤鐨勫厓绱犱釜鏁幫紝璇鋒寜4</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">娓呯┖鏍堢殑鍏冪礌錛岃鎸?</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">鎵撳嵃鏍堢殑鍏冪礌錛岃鎸?</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">閫鍑猴紝璇鋒寜7</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">*****************************************</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">璇烽夋嫨:</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    cin</span><span style="COLOR: #000000">>></span><span style="COLOR: #000000">choice;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    return choice;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> main()<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>{<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    linkedStack obj;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    bool </span><span style="COLOR: #0000ff">exit</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">false</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    </span><span style="COLOR: #0000ff">while</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    {<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> choice</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">menu();<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        switch(choice)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        {<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> s;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">璇瘋緭鍏ヨ鎺ㄥ叆鍏冪礌鐨勬暟鎹煙:</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cin</span><span style="COLOR: #000000">>></span><span style="COLOR: #000000">s;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            obj.Push(s);break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> x;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">璇蜂換鎰忚緭鍏ヤ竴涓暟:</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cin</span><span style="COLOR: #000000">>></span><span style="COLOR: #000000">x;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">obj.Pop(x)</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000"> y;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">璇蜂換鎰忚緭鍏ヤ竴涓暟,鐢ㄥ仛榪斿洖鏍堥《鍏冪礌鐨勫鍣?</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cin</span><span style="COLOR: #000000">>></span><span style="COLOR: #000000">y;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">obj.getTop(y)</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">4</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            cout</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">obj.getSize()</span><span style="COLOR: #000000"><<</span><span style="COLOR: #000000">endl;break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">5</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            obj.makeEmpty();break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">6</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            obj.output();break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">case</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">7</span><span style="COLOR: #000000">:<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            </span><span style="COLOR: #0000ff">exit</span><span style="COLOR: #000000">=</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">;break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        }<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>        </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(</span><span style="COLOR: #0000ff">exit</span><span style="COLOR: #000000">==</span><span style="COLOR: #0000ff">true</span><span style="COLOR: #000000">)<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>            break;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    }<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>    return </span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">;<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top>}<br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top><br><img src="http://www.shnenglu.com/Images/OutliningIndicators/None.gif" align=top></span></div> <img src ="http://www.shnenglu.com/heidaizx/aggbug/34214.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/heidaizx/" target="_blank">heidaizx</a> 2007-10-14 15:17 <a href="http://www.shnenglu.com/heidaizx/articles/34214.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <a href="http://www.shnenglu.com/">青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品</a> <div style="position:fixed;left:-9000px;top:-9000px;"><font id="pjuwb"></font><button id="pjuwb"><pre id="pjuwb"></pre></button><sub id="pjuwb"></sub><tbody id="pjuwb"><var id="pjuwb"><address id="pjuwb"></address></var></tbody><listing id="pjuwb"><label id="pjuwb"><strong id="pjuwb"></strong></label></listing><wbr id="pjuwb"><small id="pjuwb"><tbody id="pjuwb"></tbody></small></wbr><ins id="pjuwb"><xmp id="pjuwb"></xmp></ins><style id="pjuwb"></style><label id="pjuwb"><em id="pjuwb"><li id="pjuwb"></li></em></label><samp id="pjuwb"></samp><menu id="pjuwb"><input id="pjuwb"></input></menu><pre id="pjuwb"><tbody id="pjuwb"><tfoot id="pjuwb"><button id="pjuwb"></button></tfoot></tbody></pre><form id="pjuwb"></form><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"><sup id="pjuwb"></sup></label></style></i><li id="pjuwb"><table id="pjuwb"><abbr id="pjuwb"></abbr></table></li><video id="pjuwb"></video><dfn id="pjuwb"></dfn><progress id="pjuwb"></progress><strong id="pjuwb"></strong><mark id="pjuwb"></mark><em id="pjuwb"></em><tbody id="pjuwb"><p id="pjuwb"><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike></p></tbody><option id="pjuwb"></option><strike id="pjuwb"></strike><u id="pjuwb"></u><td id="pjuwb"><center id="pjuwb"><tr id="pjuwb"></tr></center></td><em id="pjuwb"><mark id="pjuwb"><em id="pjuwb"><tt id="pjuwb"></tt></em></mark></em><strong id="pjuwb"></strong><wbr id="pjuwb"></wbr><s id="pjuwb"></s><strong id="pjuwb"></strong><legend id="pjuwb"></legend><nav id="pjuwb"></nav><dl id="pjuwb"><th id="pjuwb"><dl id="pjuwb"></dl></th></dl><noframes id="pjuwb"><ins id="pjuwb"></ins></noframes><font id="pjuwb"></font><strike id="pjuwb"><i id="pjuwb"><style id="pjuwb"><label id="pjuwb"></label></style></i></strike><output id="pjuwb"></output><thead id="pjuwb"><pre id="pjuwb"></pre></thead><source id="pjuwb"></source><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem><pre id="pjuwb"><span id="pjuwb"><pre id="pjuwb"><big id="pjuwb"></big></pre></span></pre><cite id="pjuwb"><fieldset id="pjuwb"><s id="pjuwb"><rt id="pjuwb"></rt></s></fieldset></cite><big id="pjuwb"><progress id="pjuwb"><big id="pjuwb"></big></progress></big><samp id="pjuwb"><delect id="pjuwb"></delect></samp><dl id="pjuwb"></dl><strike id="pjuwb"><nav id="pjuwb"><dl id="pjuwb"><strong id="pjuwb"></strong></dl></nav></strike><tbody id="pjuwb"><b id="pjuwb"><optgroup id="pjuwb"><rp id="pjuwb"></rp></optgroup></b></tbody><em id="pjuwb"></em><xmp id="pjuwb"><blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote></xmp> <i id="pjuwb"><abbr id="pjuwb"><i id="pjuwb"><abbr id="pjuwb"></abbr></i></abbr></i><center id="pjuwb"><acronym id="pjuwb"><center id="pjuwb"></center></acronym></center><pre id="pjuwb"></pre><ul id="pjuwb"><thead id="pjuwb"></thead></ul><blockquote id="pjuwb"><pre id="pjuwb"><sup id="pjuwb"></sup></pre></blockquote><acronym id="pjuwb"></acronym><big id="pjuwb"><s id="pjuwb"></s></big><th id="pjuwb"></th><th id="pjuwb"></th><tbody id="pjuwb"></tbody><thead id="pjuwb"><strike id="pjuwb"></strike></thead><th id="pjuwb"><dl id="pjuwb"><wbr id="pjuwb"></wbr></dl></th><dl id="pjuwb"><strong id="pjuwb"></strong></dl><abbr id="pjuwb"><noframes id="pjuwb"><noscript id="pjuwb"></noscript></noframes></abbr><td id="pjuwb"><ol id="pjuwb"></ol></td><li id="pjuwb"><noscript id="pjuwb"><abbr id="pjuwb"></abbr></noscript></li><small id="pjuwb"><bdo id="pjuwb"><nav id="pjuwb"></nav></bdo></small><style id="pjuwb"></style><optgroup id="pjuwb"><table id="pjuwb"></table></optgroup><center id="pjuwb"><tr id="pjuwb"><dfn id="pjuwb"></dfn></tr></center><th id="pjuwb"></th><u id="pjuwb"></u><tfoot id="pjuwb"><legend id="pjuwb"><i id="pjuwb"></i></legend></tfoot><mark id="pjuwb"></mark><meter id="pjuwb"></meter><nav id="pjuwb"></nav><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><acronym id="pjuwb"><pre id="pjuwb"><acronym id="pjuwb"><ul id="pjuwb"></ul></acronym></pre></acronym><nobr id="pjuwb"></nobr><sub id="pjuwb"><th id="pjuwb"><menuitem id="pjuwb"><wbr id="pjuwb"></wbr></menuitem></th></sub><thead id="pjuwb"><sub id="pjuwb"></sub></thead><ul id="pjuwb"><address id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></address></ul><dfn id="pjuwb"></dfn><pre id="pjuwb"></pre><input id="pjuwb"><cite id="pjuwb"><fieldset id="pjuwb"></fieldset></cite></input><u id="pjuwb"><form id="pjuwb"><u id="pjuwb"></u></form></u><kbd id="pjuwb"><em id="pjuwb"><mark id="pjuwb"></mark></em></kbd><tr id="pjuwb"></tr><del id="pjuwb"><form id="pjuwb"><address id="pjuwb"></address></form></del><tfoot id="pjuwb"><legend id="pjuwb"><ol id="pjuwb"><dl id="pjuwb"></dl></ol></legend></tfoot><menu id="pjuwb"><nobr id="pjuwb"><th id="pjuwb"><nobr id="pjuwb"></nobr></th></nobr></menu><fieldset id="pjuwb"></fieldset><pre id="pjuwb"><blockquote id="pjuwb"><samp id="pjuwb"></samp></blockquote></pre><xmp id="pjuwb"><sup id="pjuwb"><pre id="pjuwb"></pre></sup></xmp><span id="pjuwb"><progress id="pjuwb"></progress></span><font id="pjuwb"></font><var id="pjuwb"><abbr id="pjuwb"></abbr></var><strong id="pjuwb"><label id="pjuwb"><i id="pjuwb"><legend id="pjuwb"></legend></i></label></strong><tr id="pjuwb"><em id="pjuwb"><em id="pjuwb"><output id="pjuwb"></output></em></em></tr><thead id="pjuwb"><strike id="pjuwb"></strike></thead> <acronym id="pjuwb"></acronym><i id="pjuwb"></i><tt id="pjuwb"></tt><rt id="pjuwb"><source id="pjuwb"><rt id="pjuwb"></rt></source></rt><strike id="pjuwb"><acronym id="pjuwb"></acronym></strike><del id="pjuwb"></del><font id="pjuwb"><output id="pjuwb"><ins id="pjuwb"><output id="pjuwb"></output></ins></output></font><kbd id="pjuwb"><tr id="pjuwb"><kbd id="pjuwb"></kbd></tr></kbd><pre id="pjuwb"><sup id="pjuwb"><delect id="pjuwb"><samp id="pjuwb"></samp></delect></sup></pre><samp id="pjuwb"></samp><track id="pjuwb"></track><tr id="pjuwb"></tr><center id="pjuwb"></center><fieldset id="pjuwb"></fieldset><i id="pjuwb"></i><td id="pjuwb"></td><rt id="pjuwb"></rt><object id="pjuwb"></object><pre id="pjuwb"><progress id="pjuwb"><sub id="pjuwb"><thead id="pjuwb"></thead></sub></progress></pre><kbd id="pjuwb"><tr id="pjuwb"><option id="pjuwb"></option></tr></kbd><output id="pjuwb"><ins id="pjuwb"></ins></output><ol id="pjuwb"></ol><source id="pjuwb"></source><strong id="pjuwb"></strong><ruby id="pjuwb"></ruby><sub id="pjuwb"><meter id="pjuwb"><menuitem id="pjuwb"><meter id="pjuwb"></meter></menuitem></meter></sub><pre id="pjuwb"></pre><center id="pjuwb"></center><tr id="pjuwb"><tbody id="pjuwb"><xmp id="pjuwb"><dd id="pjuwb"></dd></xmp></tbody></tr><video id="pjuwb"></video><pre id="pjuwb"></pre><form id="pjuwb"><optgroup id="pjuwb"></optgroup></form><samp id="pjuwb"></samp><kbd id="pjuwb"></kbd><strong id="pjuwb"><option id="pjuwb"></option></strong><object id="pjuwb"></object><abbr id="pjuwb"><noframes id="pjuwb"><abbr id="pjuwb"></abbr></noframes></abbr><ul id="pjuwb"><del id="pjuwb"><button id="pjuwb"><pre id="pjuwb"></pre></button></del></ul><abbr id="pjuwb"></abbr><strong id="pjuwb"><code id="pjuwb"><strong id="pjuwb"></strong></code></strong><option id="pjuwb"></option><optgroup id="pjuwb"><bdo id="pjuwb"><code id="pjuwb"></code></bdo></optgroup><mark id="pjuwb"><em id="pjuwb"><font id="pjuwb"></font></em></mark><acronym id="pjuwb"><code id="pjuwb"></code></acronym><dl id="pjuwb"></dl><em id="pjuwb"></em><object id="pjuwb"><input id="pjuwb"><object id="pjuwb"></object></input></object><output id="pjuwb"><dd id="pjuwb"></dd></output><option id="pjuwb"><button id="pjuwb"><option id="pjuwb"></option></button></option><small id="pjuwb"></small></div> <a href="http://ooonefteprompellets.com" target="_blank">欧美不卡激情三级在线观看</a>| <a href="http://2cc8.com" target="_blank">国产欧美一区二区精品仙草咪 </a>| <a href="http://kk1xx-com.com" target="_blank">香蕉成人久久</a>| <a href="http://292q.com" target="_blank">国产精品久久久久aaaa九色</a>| <a href="http://www474000c.com" target="_blank">亚洲视频999</a>| <a href="http://hg4958.com" target="_blank">久久久久久国产精品mv</a>| <a href="http://2996611.com" target="_blank">精品999在线观看</a>| <a href="http://2629929.com" target="_blank">欧美成人精品福利</a>| <a href="http://www-xj788.com" target="_blank">日韩一本二本av</a>| <a href="http://0000zz.com" target="_blank">久久大逼视频</a>| <a href="http://shuoqe.com" target="_blank">亚洲国产精品va在线看黑人动漫</a>| <a href="http://www-6410c.com" target="_blank">久久午夜电影</a>| <a href="http://4446666.com" target="_blank">日韩视频精品在线观看</a>| <a href="http://226600b.com" target="_blank">性欧美精品高清</a>| <a href="http://www62265.com" target="_blank">一区二区在线视频观看</a>| <a href="http://wewe520.com" target="_blank">欧美韩日高清</a>| <a href="http://555415.com" target="_blank">欧美一级黄色网</a>| <a href="http://atmub.com" target="_blank">亚洲高清资源</a>| <a href="http://25axxa.com" target="_blank">亚洲综合色视频</a>| <a href="http://1188188.com" target="_blank">国产综合欧美</a>| <a href="http://www1982t.com" target="_blank">欧美日韩高清在线观看</a>| <a href="http://81plas.com" target="_blank">欧美伊人精品成人久久综合97 </a>| <a href="http://wawabt.com" target="_blank">欧美一区国产一区</a>| <a href="http://wanmajc.com" target="_blank">亚洲高清免费视频</a>| <a href="http://287975.com" target="_blank">性久久久久久久久久久久</a>| <a href="http://78gde.com" target="_blank">亚洲国产第一</a>| <a href="http://www24668.com" target="_blank">国产精品久久毛片a</a>| <a href="http://39ddtv.com" target="_blank">久热re这里精品视频在线6</a>| <a href="http://394141.com" target="_blank">99精品国产一区二区青青牛奶</a>| <a href="http://aidou28.com" target="_blank">久久精品二区三区</a>| <a href="http://taotuango.com" target="_blank">亚洲乱码久久</a>| <a href="http://ez4444.com" target="_blank">黑人极品videos精品欧美裸</a>| <a href="http://8090567.com" target="_blank">欧美精品一区二区三区久久久竹菊</a>| <a href="http://400206.com" target="_blank">亚洲欧美日韩系列</a>| <a href="http://hhjc7.com" target="_blank">亚洲精品1234</a>| <a href="http://283575.com" target="_blank">老色批av在线精品</a>| <a href="http://8946286.com" target="_blank">亚洲欧美电影在线观看</a>| <a href="http://221080.com" target="_blank">亚洲理伦电影</a>| <a href="http://555yye.com" target="_blank">精品成人一区</a>| <a href="http://7770790.com" target="_blank">国产精品毛片a∨一区二区三区|国</a>| <a href="http://sdsankeguo.com" target="_blank">久久这里有精品视频 </a>| <a href="http://ae262.com" target="_blank">亚洲欧美激情诱惑</a>| <a href="http://86868o.com" target="_blank">亚洲精品国产系列</a>| <a href="http://fxsdcj.com" target="_blank">久久久噜噜噜久久中文字幕色伊伊 </a>| <a href="http://k82net.com" target="_blank">久久国产欧美日韩精品</a>| <a href="http://caosee.com" target="_blank">一本色道久久加勒比精品</a>| <a href="http://337791.com" target="_blank">欧美国产一区在线</a>| <a href="http://goldure.com" target="_blank">久久青草久久</a>| <a href="http://lalandapps.com" target="_blank">欧美一区二区三区久久精品茉莉花</a>| <a href="http://444398.com" target="_blank">99国产精品99久久久久久粉嫩</a>| <a href="http://xigou666.com" target="_blank">韩曰欧美视频免费观看</a>| <a href="http://mytopvogue.com" target="_blank">国产精品久久久久免费a∨</a>| <a href="http://www49773.com" target="_blank">欧美成人免费在线视频</a>| <a href="http://www-90567.com" target="_blank">久久九九热免费视频</a>| <a href="http://avtb2068.com" target="_blank">亚洲欧美日韩精品在线</a>| <a href="http://www993997.com" target="_blank">在线亚洲精品</a>| <a href="http://9585865.com" target="_blank">日韩一级精品视频在线观看</a>| <a href="http://798814.com" target="_blank">亚洲成色777777在线观看影院</a>| <a href="http://wwww999.com" target="_blank">久久五月激情</a>| <a href="http://137177.com" target="_blank">久久婷婷综合激情</a>| <a href="http://cp50088.com" target="_blank">久久精品夜色噜噜亚洲a∨</a>| <a href="http://hy8r.com" target="_blank">欧美在线视频二区</a>| <a href="http://0808333.com" target="_blank">午夜一区在线</a>| <a href="http://xccp4888.com" target="_blank">欧美一区二区日韩一区二区</a>| <a href="http://566805.com" target="_blank">亚洲女人天堂成人av在线</a>| <a href="http://794238.com" target="_blank">亚洲视频第一页</a>| <a href="http://www-34909.com" target="_blank">在线一区二区三区做爰视频网站</a>| <a href="http://227002.com" target="_blank">99精品视频免费全部在线</a>| <a href="http://042455.com" target="_blank">99re这里只有精品6</a>| <a href="http://488918.com" target="_blank">99精品国产高清一区二区</a>| <a href="http://www330088.com" target="_blank">亚洲毛片在线观看</a>| <a href="http://kongtou8.com" target="_blank">日韩午夜精品视频</a>| <a href="http://520844www.com" target="_blank">妖精成人www高清在线观看</a>| <a href="http://by4433.com" target="_blank">亚洲日本激情</a>| <a href="http://booyitech.com" target="_blank">99国产精品久久久久久久久久 </a>| <a href="http://xaipad.com" target="_blank">欧美成人一区二区在线</a>| <a href="http://16kkkk.com" target="_blank">欧美α欧美αv大片</a>| <a href="http://023nszz.com" target="_blank">欧美高清影院</a>| <a href="http://18av-77.com" target="_blank">亚洲国产婷婷香蕉久久久久久99</a>| <a href="http://yckjwb.com" target="_blank">亚洲国产免费</a>| <a href="http://pnxingmei.com" target="_blank">亚洲精品久久久久久久久久久</a>| <a href="http://qiaoka526.com" target="_blank">亚洲欧洲精品一区二区三区</a>| <a href="http://4488269.com" target="_blank">亚洲美女尤物影院</a>| <a href="http://xb735.com" target="_blank">宅男精品视频</a>| <a href="http://fjrxzscl.com" target="_blank">午夜一区不卡</a>| <a href="http://dh03.com" target="_blank">久久久久一本一区二区青青蜜月</a>| <a href="http://6673328.com" target="_blank">久久尤物电影视频在线观看</a>| <a href="http://4tobi.com" target="_blank">男同欧美伦乱</a>| <a href="http://78757a.com" target="_blank">欧美系列电影免费观看</a>| <a href="http://sepapapa8888.com" target="_blank">国产精品久久久久永久免费观看 </a>| <a href="http://xiaocao-av.com" target="_blank">99精品国产在热久久</a>| <a href="http://avjj80.com" target="_blank">亚洲午夜激情网站</a>| <a href="http://dy25777.com" target="_blank">午夜精品福利在线</a>| <a href="http://www49773.com" target="_blank">久久久五月天</a>| <a href="http://5207877.com" target="_blank">欧美日韩国产专区</a>| <a href="http://w3e8.com" target="_blank">国产欧美精品久久</a>| <a href="http://iotbzw.com" target="_blank">亚洲第一福利社区</a>| <a href="http://036762.com" target="_blank">一本久久精品一区二区</a>| <a href="http://yichenep.com" target="_blank">午夜亚洲激情</a>| <a href="http://yjsp8888.com" target="_blank">玖玖玖国产精品</a>| <a href="http://jiuzuifusheng.com" target="_blank">亚洲精品1区</a>| <a href="http://by777131.com" target="_blank">亚洲欧美日本视频在线观看</a>| <a href="http://chuangke168.com" target="_blank">久久精品女人的天堂av</a>| <a href="http://4399360.com" target="_blank">欧美另类亚洲</a>| <a href="http://ydpszcn.com" target="_blank">国产一级一区二区</a>| <a href="http://sinojinxing.com" target="_blank">亚洲精品一区在线</a>| <a href="http://603445.com" target="_blank">午夜精品理论片</a>| <a href="http://www-333304.com" target="_blank">欧美va亚洲va香蕉在线</a>| <a href="http://www249aaa.com" target="_blank">99在线|亚洲一区二区</a>| <a href="http://sz-jyqj.com" target="_blank">欧美一级一区</a>| <a href="http://xashp.com" target="_blank">欧美日韩国产影片</a>| <a href="http://xxoo668.com" target="_blank">国产一区二区三区四区五区美女 </a>| <a href="http://dahuxu.com" target="_blank">亚洲一区二区免费视频</a>| <a href="http://44779c.com" target="_blank">久久香蕉国产线看观看av</a>| <a href="http://goldteddy.com" target="_blank">欧美日韩国产不卡</a>| <a href="http://395493.com" target="_blank">很黄很黄激情成人</a>| <a href="http://012928.com" target="_blank">中文日韩在线</a>| <a href="http://gztcm01.com" target="_blank">老巨人导航500精品</a>| <a href="http://7v51.com" target="_blank">一区二区三区你懂的</a>| <a href="http://aydsrmyy.com" target="_blank">久久在线播放</a>| <a href="http://baoyu1313.com" target="_blank">国产欧美日韩专区发布</a>| <a href="http://6222h.com" target="_blank">日韩一级视频免费观看在线</a>| <a href="http://9882355.com" target="_blank">久久免费高清</a>| <a href="http://666777v3.com" target="_blank">亚洲天堂av电影</a>| <a href="http://di4see.com" target="_blank">欧美成人一区二区三区片免费</a>| <a href="http://44cgcg.com" target="_blank">国产欧美日韩一级</a>| <a href="http://77smsm.com" target="_blank">99国产精品国产精品毛片</a>| <a href="http://musicshq.com" target="_blank">久久综合久久88</a>| <a href="http://4449992.com" target="_blank">亚洲一区中文</a>| <a href="http://eee2244.com" target="_blank">欧美理论电影在线观看</a>| <a href="http://xingda-sh.com" target="_blank">影音先锋亚洲精品</a>| <a href="http://xiaoyaer.com" target="_blank">午夜精品久久久久久久蜜桃app</a>| <a href="http://www-tk8899.com" target="_blank">欧美激情中文字幕一区二区</a>| <a href="http://jiarenlady.com" target="_blank">欧美亚洲一区二区在线</a>| <a href="http://www-498787.com" target="_blank">国产精品国产三级国产a</a>| <a href="http://www-e2222.com" target="_blank">亚洲人成欧美中文字幕</a>| <a href="http://huokemima.com" target="_blank">久久国产手机看片</a>| <a href="http://ttdy20.com" target="_blank">亚洲婷婷综合色高清在线</a>| <a href="http://97sgg.com" target="_blank">欧美精品一区三区</a>| <a href="http://liuyangzi.com" target="_blank">亚洲国产裸拍裸体视频在线观看乱了中文</a>| <a href="http://poqsoft.com" target="_blank">午夜亚洲伦理</a>| <a href="http://9955377.com" target="_blank">一区二区欧美在线</a>| <a href="http://596361.com" target="_blank">欧美日本韩国一区二区三区</a>| <a href="http://avjj80.com" target="_blank">91久久在线</a>| <a href="http://zzchanke.com" target="_blank">欧美 日韩 国产一区二区在线视频</a>| <a href="http://26163c.com" target="_blank">亚洲免费在线观看视频</a>| <a href="http://596361.com" target="_blank">国产精品久久久久aaaa樱花</a>| <a href="http://163263.com" target="_blank">日韩一级精品视频在线观看</a>| <a href="http://www37999.com" target="_blank">亚洲第一成人在线</a>| <a href="http://04781900.com" target="_blank">久久夜色精品国产</a>| <a href="http://75pppp.com" target="_blank">黄色成人在线网站</a>| <a href="http://497n.com" target="_blank">久久亚洲一区二区三区四区</a>| <a href="http://59jf.com" target="_blank">欧美一二区视频</a>| <a href="http://56myf.com" target="_blank">国产日本欧美一区二区</a>| <a href="http://baoyou118.com" target="_blank">校园激情久久</a>| <a href="http://797298.com" target="_blank">亚洲欧美韩国</a>| <a href="http://98956888.com" target="_blank">国产免费一区二区三区香蕉精</a>| <a href="http://387www.com" target="_blank">亚洲欧美一区二区三区在线</a>| <a href="http://lxpaiju.com" target="_blank">一区二区欧美在线</a>| <a href="http://iietao.com" target="_blank">国产精品激情av在线播放</a>| <a href="http://099idc.com" target="_blank">亚洲一区日韩在线</a>| <a href="http://beeperagain.com" target="_blank">99在线精品观看</a>| <a href="http://yh5557.com" target="_blank">欧美午夜在线</a>| <a href="http://gykfqzgpt.com" target="_blank">午夜精品在线</a>| <a href="http://1392266.com" target="_blank">午夜久久资源</a>| <a href="http://5110010.com" target="_blank">狠狠色噜噜狠狠狠狠色吗综合</a>| <a href="http://495177.com" target="_blank">久久久噜久噜久久综合</a>| <a href="http://pabjzz.com" target="_blank">久久久久久久久久久久久9999</a>| <a href="http://papala4444.com" target="_blank">狠狠色狠狠色综合日日五</a>| <a href="http://929889.com" target="_blank">男人的天堂亚洲在线</a>| <a href="http://chenyirong.com" target="_blank">美女视频一区免费观看</a>| <a href="http://mascorcg.com" target="_blank">亚洲精选视频免费看</a>| <a href="http://660507jj.com" target="_blank">亚洲精品一区二区三区不</a>| <a href="http://www-119049.com" target="_blank">欧美日韩一卡二卡</a>| <a href="http://aqd072.com" target="_blank">亚洲欧美日韩精品在线</a>| <a href="http://jzsp121.com" target="_blank">午夜影视日本亚洲欧洲精品</a>| <a href="http://8868866.com" target="_blank">韩国免费一区</a>| <a href="http://diyiao.com" target="_blank">欧美激情一区二区久久久</a>| <a href="http://4008305555.com" target="_blank">欧美精品v日韩精品v韩国精品v</a>| <a href="http://110488.com" target="_blank">在线一区二区视频</a>| <a href="http://666675com.com" target="_blank">亚洲一区二区三区成人在线视频精品</a>| <a href="http://saobi6.com" target="_blank">国产精品自拍视频</a>| <a href="http://1069024.com" target="_blank">久久一区国产</a>| <a href="http://ooo789.com" target="_blank">欧美激情综合网</a>| <a href="http://036762.com" target="_blank">亚洲影院在线</a>| <a href="http://www-544778.com" target="_blank">欧美一区二区免费视频</a>| <a href="http://hnspygxjscyfwzx.com" target="_blank">伊人夜夜躁av伊人久久</a>| <a href="http://jiujiire.com" target="_blank">亚洲国产精品久久人人爱蜜臀 </a>| <a href="http://huangsedy.com" target="_blank">欧美极品一区</a>| <a href="http://55555549.com" target="_blank">亚洲尤物视频网</a>| <a href="http://www-577511.com" target="_blank">亚洲资源在线观看</a>| <a href="http://176sfsf.com" target="_blank">亚洲二区在线视频</a>| <a href="http://7kz6.com" target="_blank">99av国产精品欲麻豆</a>| <a href="http://56718ca.com" target="_blank">国产午夜精品久久久久久久</a>| <a href="http://56lin.com" target="_blank">欧美韩国日本综合</a>| <a href="http://00001xh.com" target="_blank">国产精品成av人在线视午夜片</a>| <a href="http://yjsp8888.com" target="_blank">久久精品一区二区三区中文字幕</a>| <a href="http://qmynong.com" target="_blank">免费日韩成人</a>| <a href="http://ccc982.com" target="_blank">午夜视频一区</a>| <a href="http://xpj493.com" target="_blank">欧美成人tv</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>