锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久精品亚洲,91久久线看在观草草青青,久久久久网站http://www.shnenglu.com/kenwell/category/1180.html鑷繁瀛︿範鎵鐢?/description>zh-cnWed, 21 May 2008 17:56:58 GMTWed, 21 May 2008 17:56:58 GMT60涓婃搗浜ら氬ぇ瀛s鐨勪竴閬撳璇曢http://www.shnenglu.com/kenwell/articles/4041.htmlc++ 瀛︿範c++ 瀛︿範Sun, 12 Mar 2006 04:21:00 GMThttp://www.shnenglu.com/kenwell/articles/4041.htmlhttp://www.shnenglu.com/kenwell/comments/4041.htmlhttp://www.shnenglu.com/kenwell/articles/4041.html#Feedback0http://www.shnenglu.com/kenwell/comments/commentRss/4041.htmlhttp://www.shnenglu.com/kenwell/services/trackbacks/4041.html緇欎綘涓涓茶礬寰勶紝璀
a\b\c
a\d\e
b\cst
d
浣犳妸榪欎簺璺緞涓暣娑電殑鐩綍緇撴瀯緇欑敾鍑烘潵錛屽瓙鐩綍鐩存帴鍒楀湪鐖剁洰褰曚笅闈紝騫舵瘮鐖剁洰褰曞悜鍙?BR>
緙╀竴鏍鹼紝灝辮薄榪欐牱
a
b
  c
d
  e
b
cst
d
鍚屼竴綰х殑闇瑕佹寜瀛楁瘝欏哄簭鎺掑垪錛屼笉鑳戒貢銆?BR>
涓嬮潰鏄垜鐨勪唬鐮侊細嬈㈣繋璁ㄨ錛坧s:闄勪歡涓槸浠g爜鏂囦歡錛?BR>
#include <iostream>
#include 
<vector>
#include 
<string>
#include 
<algorithm>
using namespace std;

typedef vector
<string> strVec;

//姣旇緝鍑芥暟
bool lessCmp(const strVec vec1, const strVec vec2)
{
    
for(int i = 0; i < vec1.size() && i < vec2.size(); i++)
    
{
        
if(vec1[i] < vec2[i])
            
return true;
        
else if(vec1[i] > vec2[i])
            
return false;
    }


    
return true;
}


int main()
{
    
int num = 0;
    cout 
<< "杈撳叆浣犳墍瑕佽緭鍏ョ殑鏂囦歡璺緞鏁扮洰: ";
    cin 
>> num;
    vector
<strVec> inputVec;
    
//
    strVec pathtemp;

    cout 
<< "杈撳叆鏂囦歡璺緞:\n";
    
for(int i = 0; i < num; i++)
    
{
        
string s;
        cin 
>> s;
        pathtemp.push_back(s);
    }



    
for(i = 0; i < pathtemp.size(); i++)
    
{
        
string text = pathtemp[i];
        
string::size_type pos = 0, pre_pos = 0;

        strVec nametemp;
        
while((pos = text.find_first_of('\\', pos)) != string::npos)
        
{
            nametemp.push_back(text.substr(pre_pos, pos 
- pre_pos));

            pre_pos 
= ++pos;
        }



        nametemp.push_back(text.substr(pre_pos, pos 
- pre_pos));
        inputVec.push_back(nametemp);
    }




    
//鎸夐『搴忚繘琛屾帓搴?/SPAN>
    sort(inputVec.begin(), inputVec.end(), lessCmp);

    cout 
<< "鎸夎姹傝緭鍏ョ殑鏂囦歡鐩綍鏍戝涓?\n";
    
if(!inputVec.empty())
    
{
        strVec nametemp 
= inputVec[0];
        
for(int num = 0; num < nametemp.size(); num++)
        
{
            
for(int j = 0; j < num; j++)
                cout 
<< " ";
            cout 
<< nametemp[num] << "\n";
        }

    }


    strVec pre 
= inputVec[0];

    
for(i = 1; i < inputVec.size(); i++)
    
{
        strVec nametemp 
= inputVec[i];
        
        
int cnt = 0;
        
while(cnt < pre.size() && cnt < nametemp.size())
        
{
            
if(pre[cnt] != nametemp[cnt])
                
break;
            cnt
++;
        }


        
for(int num = cnt; num < nametemp.size(); num++)
        
{
            
for(int j = 0; j < num; j++)
                cout 
<< " ";
            cout 
<< nametemp[num] << "\n";
        }


        pre 
= nametemp;
    }

}


]]>
国产精品久久久久久久午夜片| 国产精品嫩草影院久久| 无码日韩人妻精品久久蜜桃| 久久99精品国产麻豆 | 国产99久久久国产精免费| 国产综合免费精品久久久| 久久精品国产AV一区二区三区| 午夜精品久久久久9999高清| 伊人久久大香线蕉影院95| 久久亚洲高清综合| 天天躁日日躁狠狠久久| 91秦先生久久久久久久| 精品久久久无码人妻中文字幕| 久久国产精品久久| 国内精品久久国产| 韩国三级中文字幕hd久久精品 | 久久久无码人妻精品无码| 久久精品国产精品青草app| 蜜桃麻豆WWW久久囤产精品| 欧美一区二区精品久久| 久久久久久九九99精品| 人妻丰满AV无码久久不卡| 亚洲精品乱码久久久久久蜜桃| 久久99精品久久久久久齐齐| 亚洲国产精品久久久久婷婷老年| 无码伊人66久久大杳蕉网站谷歌 | 久久精品国产91久久综合麻豆自制 | 久久精品国产亚洲AV不卡| 99久久99这里只有免费费精品| 久久久噜噜噜久久中文字幕色伊伊| 91精品国产高清久久久久久国产嫩草| 久久精品无码午夜福利理论片| 久久夜色精品国产亚洲| 中文字幕无码久久精品青草| 亚洲欧美一区二区三区久久| 日本欧美国产精品第一页久久| 久久99精品久久久久久不卡| 国内精品欧美久久精品| 久久精品国产精品亚洲| 久久综合亚洲鲁鲁五月天| yy6080久久|