鎮(zhèn)ㄧ幇鍦ㄧ殑浣嶇疆錛?/strong> 璺ㄨ€冪綉棰戦亾鑰冪爺鎶ュ悕姝f枃

鏁版嵁緇撴瀯絎笁绔犺璁¢鍙?qiáng)鍙傝€冪瓟妗圼6]_璺ㄨ€冪綉

鏈€鍚庢洿鏂版椂闂達(dá)細(xì)2011-11-18 13:39:05
杈呭璇劇▼錛?a target="_blank" rel="nofollow">鏆戞湡闆嗚 鍦ㄧ嚎鍜ㄨ
澶嶄範(fàn)绱у紶錛岀劍澶寸儌棰濓紵閫嗛杞昏錛屾潵璺ㄨ€冪瀛i泦璁惀錛屽府浣犲鏂規(guī)硶錛屽畾鏂規(guī)錛?/span> 浜?jiǎn)瑙d竴涓?>

聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng) 聽(tīng)1. 璇峰埄鐢ㄤ袱涓爤S1鍜?/span>S2鏉ユā鎷熶竴涓槦鍒椼€傚凡鐭ユ爤鐨勪笁涓繍綆楀畾涔夊涓嬶細(xì)PUSH(ST,x):鍏冪礌x鍏?/span>ST鏍堬紱POP(ST,x)錛?/span>ST鏍堥《鍏冪礌鍑烘爤錛岃祴緇欏彉閲?/span>x錛?/span>Sempty(ST)錛氬垽ST鏍堟槸鍚︿負(fù)絀恒€傞偅涔堝浣曞埄鐢ㄦ爤鐨勮繍綆楁潵瀹炵幇璇ラ槦鍒楃殑涓変釜榪愮畻錛?/span>enqueue:鎻掑叆涓€涓厓绱犲叆闃熷垪錛?/span> dequeue:鍒犻櫎涓€涓厓绱犲嚭闃熷垪錛?/span>queue_empty錛氬垽闃熷垪涓虹┖銆傦紙璇峰啓鏄庣畻娉曠殑鎬濇兂鍙?qiáng)蹇呰鐨勬敞閲婂Q夈€?a target="_blank">瑗垮畨鐢?shù)瀛惪U戞妧澶у2001杞歡浜?/span>(10鍒?/span>)銆戙€?a target="_blank">涓婃搗浜ら€氬ぇ瀛?/a>1999 浜?/span>(12鍒?/span>)銆戙€?a target="_blank">娌蟲搗澶у1998 涓?/span>(12鍒?/span>)銆?/span>

銆€銆€綾諱技鏈鐨勫彟澶栧彊榪版湁錛?/span>

銆€銆€鏈変袱涓暱搴︾浉鍚岀殑鏍?/span>S1,S2錛屽凡鐭ヤ互涓嬪叆鏍堛€佸嚭鏍堛€佸垽鏍堟弧鍜屽垽鏍堢┖鎿嶄綔錛?/span>

銆€銆€PROCEDURE push(Stack:Stacktype;x:Datatype);

銆€銆€FUNCTION Pop(Stack:Stacktype ):Datatype;

銆€銆€FUNCTION Full (Stack:Stacktype):Boolean;

銆€銆€FUNCTION Empty(Stack:Stacktype)Boolean;

銆€銆€鐜扮敤姝や簩鏍堟瀯鎴愪竴涓槦鍒楋紝璇曞啓鍑轟笅闈㈠叆闃熷垪銆佸嚭闃熷垪鎿嶄綔綆楁硶錛?/span>

銆€銆€PROCEDURE EnQueue(x:Datatype);

銆€銆€FUNCTION DeQueue: Datatype;銆?a target="_blank">鍖椾含閭數(shù)澶у 2000 鍏紙10鍒嗭級(jí)銆?/span>

銆€銆€銆愬弬鑰冪瓟妗堛€?/span>

銆€銆€[棰樼洰鍒嗘瀽]鏍堢殑鐗圭偣鏄悗榪涘厛鍑猴紝闃熷垪鐨勭壒鐐規(guī)槸鍏堣繘鍏堝嚭銆傛墍浠ワ紝鐢ㄤ袱涓爤s1鍜?/span>s2妯℃嫙涓€涓槦鍒楁椂錛?/span>s1浣滆緭鍏ユ爤錛岄€愪釜鍏冪礌鍘嬫爤錛屼互姝ゆā鎷熼槦鍒楀厓绱犵殑鍏ラ槦銆傚綋闇€瑕佸嚭闃熸椂錛屽皢鏍?/span>s1閫€鏍堝茍閫愪釜鍘嬪叆鏍?/span>s2涓紝s1涓渶鍏堝叆鏍堢殑鍏冪礌錛屽湪s2涓浜庢爤欏躲€?/span>s2閫€鏍堬紝鐩稿綋浜庨槦鍒楃殑鍑洪槦錛屽疄鐜頒簡(jiǎn)鍏堣繘鍏堝嚭銆傛樉鐒?dòng)灱屽彧鏈夋?/span>s2涓虹┖涓?/span>s1涔熶負(fù)絀猴紝鎵嶇畻鏄槦鍒楃┖銆?/span>

銆€銆€(1) int enqueue(stack s1,elemtp x)

銆€銆€//s1鏄閲忎負(fù)n鐨勬爤錛屾爤涓厓绱犵被鍨嬫槸elemtp銆傛湰綆楁硶灝?/span>x鍏ユ爤錛岃嫢鍏ユ爤鎴愬姛榪斿洖1錛屽惁鍒欒繑鍥?/span>0銆?/span>

銆€銆€{if(top1==n && !Sempty(s2)) //top1鏄爤s1鐨勬爤欏舵寚閽堬紝鏄叏灞€鍙橀噺銆?/span>

銆€銆€{printf(鈥滄爤婊♀€?/span>);return(0);} //s1婊?/span>s2闈炵┖,榪欐椂s1涓嶈兘鍐嶅叆鏍堛€?/span>

銆€銆€if(top1==n && Sempty(s2)) //鑻?/span>s2涓虹┖錛屽厛灝?/span>s1閫€鏍?/span>,鍏冪礌鍐嶅帇鏍堝埌s2銆?/span>

銆€銆€{while(!Sempty(s1)) {POP(s1,x);PUSH(s2,x);}

銆€銆€PUSH(s1,x); return(1); //x鍏ユ爤錛屽疄鐜頒簡(jiǎn)闃熷垪鍏冪礌鐨勫叆闃熴€?/span>

銆€銆€}

銆€銆€(2) void dequeue(stack s2,s1)

銆€銆€//s2鏄緭鍑烘爤錛屾湰綆楁硶灝?/span>s2鏍堥《鍏冪礌閫€鏍堬紝瀹炵幇闃熷垪鍏冪礌鐨勫嚭闃熴€?/span>

銆€銆€{if(!Sempty(s2)) //鏍?/span>s2涓嶇┖錛屽垯鐩存帴鍑洪槦銆?/span>

銆€銆€{POP(s2,x); printf(鈥滃嚭闃熷厓绱犱負(fù)鈥?/span>,x); }

銆€銆€else //澶勭悊s2絀烘爤銆?/span>

銆€銆€if(Sempty(s1)) {printf(鈥滈槦鍒楃┖鈥?/span>);exit(0);}//鑻ヨ緭鍏ユ爤涔熶負(fù)絀猴紝鍒欏垽瀹氶槦絀恒€?/span>

銆€銆€else //鍏堝皢鏍?/span>s1鍊掑叆s2涓紝鍐嶄綔鍑洪槦鎿嶄綔銆?/span>

銆€銆€{while(!Sempty(s1)) {POP(s1,x);PUSH(s2,x);}

銆€銆€POP(s2,x); //s2閫€鏍堢浉褰撻槦鍒楀嚭闃熴€?/span>

銆€銆€printf(鈥滃嚭闃熷厓绱犫€濓紝x);

銆€銆€}

銆€銆€}//緇撴潫綆楁硶dequue銆?/span>

銆€銆€(3) int queue_empty()

銆€銆€//鏈畻娉曞垽鐢ㄦ爤s1鍜?/span>s2妯℃嫙鐨勯槦鍒楁槸鍚︿負(fù)絀恒€?/span>

銆€銆€{if(Sempty(s1)&&Sempty(s2)) return(1);//闃熷垪絀恒€?/span>

銆€銆€else return(0); //闃熷垪涓嶇┖銆?/span>

銆€銆€}

銆€銆€[綆楁硶璁ㄨ]綆楁硶涓亣瀹氭爤s1鍜屾爤s2瀹歸噺鐩稿悓銆傚嚭闃熶粠鏍?/span>s2鍑猴紝褰?/span>s2涓虹┖鏃訛紝鑻?/span>s1涓嶇┖錛屽垯灝?/span>s1鍊掑叆s2鍐嶅嚭鏍堛€傚叆闃熷湪s1錛屽綋s1婊″悗錛岃嫢s2絀猴紝鍒欏皢s1鍊掑叆s2錛屼箣鍚庡啀鍏ラ槦銆傚洜姝ら槦鍒楃殑瀹歸噺涓轟袱鏍堝閲忎箣鍜屻€傚厓绱犱粠鏍?/span>s1鍊掑叆s2錛屽繀欏誨湪s2絀虹殑鎯呭喌涓嬫墠鑳借繘琛岋紝鍗沖湪瑕佹眰鍑洪槦鎿嶄綔鏃訛紝鑻?/span>s2絀猴紝鍒欎笉璁?/span>s1鍏冪礌澶氬皯錛堝彧瑕佷笉絀猴級(jí)錛屽氨瑕佸叏閮ㄥ€掑叆s2涓€?/span>

銆€銆€綾諱技鏈鍙欒堪鐨勫叾瀹冮鐨勮В絳旓細(xì)

銆€銆€璇ラ鍚屼笂闈㈤鏈川鐩稿悓錛屽彧鏈夊彊榪頒笉鍚岋紝璇峰弬鑰冧笂棰樼瓟妗堛€?/font>

銆€銆€2022鑰冪爺鍒濆璇曞凡緇忔帴榪戝熬澹幫紝鑰冪爺瀛﹀瓙鍏ㄩ潰榪涘叆2023灞婂鑰?/b>錛岃法鑰冧負(fù)23鑰冪爺鐨勮€冪敓鍑嗗浜?0澶ц鍖呭叏紼嬪噯澶囥€佸叏騫村涔?fàn)澶囪€冭鍒掋€佺洰鏍囬櫌鏍′笓涓氳緟瀵箋€佸叏鐪熷璇曟ā鎷熺粌涔?fàn)鍜屽叏绋嬮拡瀵规€ф寚瀵鹼紱2023鑰冪爺鐨勫皬浼欎即閽堜篃宸茬粡寮€濮嬫嫨鏍″拰澶嶄範(fàn)浜?jiǎn)锛岃法鑰冭€冪爺鐣呭5.0鐗堟湰鍏ㄦ柊鍗囩駭錛屾棤璁轟綘鍦ㄦ牎鍦ㄥ閮藉彲浠ユ洿鑷鐨勫畬鎴愪綘鐨勮€冪爺澶嶄範(fàn)錛?/a>鏆戝亣闆嗚钀?/span>甯︽潵浜?jiǎn)闄㈡牎涓撲笟鍒濇閫夋嫨錛屾槑紜柟鍚戯紱鑰冪爺澶囪€冨叏騫磋鍒掞紝鏍稿績(jī)鐭ヨ瘑鐐瑰叆闂紱涓€у寲鍒跺畾澶囪€冩柟妗堬紝鍔╀綘璧㈠湪璧瘋窇綰匡紝鏃╁嚭鍙戜竴鐐圭鎴愬姛灝辨洿榪戜竴鐐癸紒

鐐瑰嚮鍙充晶鍜ㄨ鎴?/strong>鐩存帴鍓嶅線浜?jiǎn)瑙f洿澶?/strong>

鑰冪爺闄㈡牎涓撲笟閫夋嫨鍜岃€冪爺澶嶄範(fàn)璁″垝
2023澶囪€冨涔?/td> 2023綰夸笂綰夸笅闅忔椂瀛︿範(fàn) 34鎵€鑷垝綰塊櫌鏍¤€冪爺澶嶈瘯鍒嗘暟綰挎眹鎬?/td>
2022鑰冪爺澶嶈瘯鏈€鍏ㄤ俊鎭暣鐞?/a> 鍏ㄥ浗鍚勬嫑鐢熼櫌鏍¤€冪爺澶嶈瘯鍒嗘暟綰挎眹鎬?/a>
2023鍏ㄦ棩鍒跺皝闂緇?/span> 鍏ㄥ浗鍚勬嫑鐢熼櫌鏍¤€冪爺璋冨墏淇℃伅姹囨€?/a>
2023鑰冪爺鍏堢煡 鑰冪爺鑰冭瘯縐戠洰鏈夊摢浜涳紵 濡備綍姝g‘鐪嬪緟鑰冪爺鍒嗘暟綰匡紵
涓嶅悓闄㈡牎鐩稿悓涓撲笟濡備綍閫夋嫨鏇撮€傚悎鑷繁鐨?/a> 浠庡氨涓氳鑰冪爺濡備綍鎷╀笓涓氾紵
鎵嬫妸鎵嬫暀浣犲浣曢€変笓涓氾紵 楂樻牎鐮旂┒鐢熸暀鑲插悇瀛︾闂ㄧ被鎺掕姒?/a>

璺ㄨ€冭€冪爺璇劇▼

鐝瀷 瀹氬悜鐝瀷 寮€鐝椂闂?/td> 楂樺畾鐝?/td> 鏍囧噯鐝?/td> 璇劇▼浠嬬粛 鍜ㄨ
縐嬪闆嗚 鍐插埡鐝?/td> 9.10-12.20 168000 24800璧?/td> 灝忕彮闈㈡巿+涓撲笟璇?瀵?+涓撲笟璇懼畾鍚戣緟瀵?鍗忚鍔犲己璇劇▼(楂樺畾鐝?+涓撳睘瑙勫垝絳旂枒(楂樺畾鐝?+綺劇粏鍖栫瓟鐤?澶嶈瘯璧勬簮(楂樺畾鐝?+澶嶈瘯璇懼寘(楂樺畾鐝?+澶嶈瘯鎸囧(楂樺畾鐝?+澶嶈瘯鐝富浠?v1鏈嶅姟(楂樺畾鐝?+澶嶈瘯闈㈡巿瀵嗚(楂樺畾鐝?+澶嶈瘯1v1(楂樺畾鐝?
2023闆嗚鐣呭 闈炲畾鍚戯紙鏀胯嫳鐝?鏁版斂鑻辯彮錛?/td> 姣忔湀20鏃?/td> 22800璧?鍗忚鐝? 13800璧?/td> 鍏堣闃跺湪綰胯紼?鍩虹闃跺湪綰胯紼?寮哄寲闃跺湪綰胯紼?鐪熼闃跺湪綰胯紼?鍐插埡闃跺湪綰胯紼?涓撲笟璇鵑拡瀵規(guī)€т竴瀵逛竴璇劇▼+鐝富浠誨叏紼嬬潱瀛︽湇鍔?鍏ㄧ▼瑙勫垝浣撶郴+鍏ㄧ▼嫻嬭瘯浣撶郴+鍏ㄧ▼綺劇粏鍖栫瓟鐤?鎷╂牎鎷╀笓涓氳兘鍔涘畾浣嶄綋緋?鍏ㄥ勾鍏抽敭鐜妭鎸囧浣撶郴+鍒濊瘯鍔犲己璇?鍒濊瘯涓撳睘鏈嶅姟+澶嶈瘯鍏ㄧ鏍囧噯鐝湇鍔?/td>

鈶犲嚒鏈綉娉ㄦ槑鈥滅浠舵潵婧愶細(xì)璺ㄨ€冪綉鈥濈殑鎵€鏈夋枃瀛椼€佸浘鐗囧拰闊寵棰戠浠訛紝鐗堟潈鍧囧睘鍖椾含灝氬紜曞崥鏁欒偛鍜ㄨ鏈夐檺鍏徃錛堝惈鏈綉鍜岃法鑰冪綉錛夋墍鏈夛紝浠諱綍濯掍綋銆佺綉绔欐垨涓漢鏈粡鏈綉鍗忚鎺堟潈涓嶅緱杞澆銆侀摼鎺ャ€佽漿甯栨垨浠ュ叾浠栦換浣曟柟寮忓鍒躲€佸彂琛ㄣ€傚凡緇忔湰緗戝崗璁巿鏉冪殑濯掍綋銆佺綉绔欙紝鍦ㄤ笅杞戒嬌鐢ㄦ椂蹇呴』娉ㄦ槑鈥滅浠舵潵婧愶紝璺ㄨ€冪綉鈥濓紝榪濊€呮湰緗戝皢渚濇硶榪界┒娉曞緥璐d換銆?/p>

鈶℃湰緗戞湭娉ㄦ槑鈥滅浠舵潵婧愶細(xì)璺ㄨ€冪綉鈥濈殑鏂?鍥劇瓑紼夸歡鍧囦負(fù)杞澆紼匡紝鏈綉杞澆浠呭熀浜庝紶閫掓洿澶氫俊鎭箣鐩殑錛屽茍涓嶆剰鍛崇潃鍐嶉€氳漿杞界鐨勮鐐規(guī)垨璇佸疄鍏跺唴瀹圭殑鐪熷疄鎬с€傚鍏朵粬濯掍綋銆佺綉绔欐垨涓漢浠庢湰緗戜笅杞戒嬌鐢紝蹇呴』淇濈暀鏈綉娉ㄦ槑鐨勨€滅浠舵潵婧愨€濓紝騫惰嚜璐熺増鏉冪瓑娉曞緥璐d換銆傚鎿呰嚜綃℃敼涓衡€滅浠舵潵婧愶細(xì)璺ㄨ€冪綉鈥濓紝鏈綉灝嗕緷娉曡拷絀舵硶寰嬭矗浠匯€?/p>

鈶㈠鏈綉杞澆紼挎秹鍙?qiáng)鐗堟潈绛夐棶棰樺Q岃浣滆€呰紼垮悗鍦ㄤ袱鍛ㄥ唴閫熸潵鐢?shù)涓庤法鑰冪綉鑱旂郴錛岀數(shù)璇濓細(xì)400-883-2220