数据结构试题集

数据结构试题集

ID:83483804

大小:12.71 MB

页数:92页

时间:2023-07-06

上传者:灯火阑珊2019
数据结构试题集_第1页
数据结构试题集_第2页
数据结构试题集_第3页
数据结构试题集_第4页
数据结构试题集_第5页
数据结构试题集_第6页
数据结构试题集_第7页
数据结构试题集_第8页
数据结构试题集_第9页
数据结构试题集_第10页
资源描述:

《数据结构试题集》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

.⚪1.ᦪ᪀ᒹᦪḄ᪀ஹᦪḄ᪀஺2.ᦪḄ᪀ᑖᜧ஺3.ᙠ!"#$Ḅ%&'()*+!",-Ḅ+.⌕᪗12஺4.3456Ḅn+ᐗ8(᪀⌼:Ḅ᪀ᨵ<ឋஹ᪛?ஹ@A஺5.ᦪḄ᪀BCᨵDE᪀ஹFG᪀(Hᨵo6.IᡂᦪḄKLᓫN2o7.ᦪ᪀Ḅ+⌕82஺8.OP⚣R2஺9.!"2-10.ᦪTU!V⚪2;XᦪTU!V⚪2»11.ZE2o12.[\ᦪ2஺13.]^ᦪ᪀_ZḄ`Ḅ2஺14.!"ᵨbc஺15.dR2oe.fg⚪1.hij!"kZEᨵlmnop2.q+ᦪ᪀Ḅrs(tcᐸ᪀ஹ᪀v!wxyz{|☢Ḅᑁ஺gr᝞ᨵ]ᡂ⊤(+Ḅ]ᔜ_Ḅᡂ஺ᢥ]ḄᡂḄ⊤஺+⊤2+ᦪ᪀஺+2+(34᦮+⊤ᩭi(ᨵ++(ᐸḄᑣᔜᨵ+ᨵ+%¡¢஺£+ᐵ¥$6+⊤Ḅ᪀——

1____________________ð஺4.ᙠᐹᨵn+ᐗ8ḄDE⊤®âᐭ+ᐗ8(ᔠ"ḄâᐭNýᨵ+஺5.ᙠ+þRnḄDE⊤®i+ᐗ8(l<=i<=n)¸%âᐭ+ᐗ8é(◤ᔣ_ᐗ஺6.᪀Ḅឋ⊤ᡠᨵᐗḄᙢᙬ஺7.᪀Ḅឋ⊤ᐸᱥᳮ᪀᪀!Ḅ஺8.ᙠᐹᨵnᐗḄ᪀Ḅឋ⊤$%&'()ᐭ&ᐗ+ᙠ,ᭆ᳛ᩩ01+2ᙳ◤⌕ᐗ஺9.ᙠᐹᨵnᐗḄ᪀Ḅឋ⊤$%&'(ᑤ◀&ᐗ+ᙠ,ᭆ᳛ᩩ01+2ᙳ◤⌕ᐗ஺10.ᙠᐹᨵnᐗḄ᪀Ḅឋ⊤89:ᐗ+2ᙳ◤⌕;<=஺11.᪀Ḅឋ⊤+)ᐭᡈᑤ◀:ᐗ?+ᐗḄ=ᦪᐸ'(__ᐵ(CᨵᡈD)஺12.᪀Ḅឋ⊤+FGHiᐗᐸ'(ᐵ஺(CᨵᡈD)஺13.ᙠᐹᨵnᐗḄ᪀Ḅឋ⊤⌕FGHiᐗḄ?IJᩖL!14.ᙠ⊤LḄi'()ᐭ:ᐗX,MN)ᐭ?+i'(OPi'(OḄᐗ◤⌕+✌ᐜḄ!ᐗ஺15.⌕ᑤ◀⊤LḄi'(ḄᐗX,MNᑤ◀?+i'(OḄᐗ◤⌕S+✌ᐜSḄ!ᐗ஺16.ᙠᐹᨵnᐗḄ᪀Ḅឋ⊤)ᐭ:ᐗḄ?IJᩖL!஺17.T⊤Ḅᐗ!U1'(VWXḄ+⌕ᑤ◀ᐹᨵnᐗḄ⊤:ᐗ+ᔠZḄᑤ◀'(!஺18.ᙠᐹᨵnᐗḄ᪀Ḅឋ⊤ᑤ◀:ᐗḄ?IJᩖL!஺[.\]⚪1.1ᑡ`Zaᡂᙠ⊤SeqLḄHi'()ᐭᐗX,MN)ᐭcd1,ᔲᑣcd0ᡈ-1,gᙠhḄ1ᑜjCᑏᔠ〉Ḅᑁnaᡂo`Z஺intseq_ins(SeqList*SeqL,inti,DataTypex){intj;if()/*⊤r*/{printf("thelistisfull

2");return0;}elseif(iSeqL->len+l)/*'(st*/{printf("thepositionisinvalid

3");return-1;}else/*MN)ᐭ*/{for(j=SeqL->len;j>=i;j-)/*ᐗ*//*)ᐭᐗ*/(SeqL->len)++;/*⊤uv1*/))

42.1ᑡ`Zaᡂᑤ◀⊤SeqLḄHiᐗ+ᐗwxyDataType,ᐸz{|}ᦪpxcd,gᙠhḄ1ᑜjCᑏᔠ〉Ḅᑁnaᡂo`Z஺intseq_del(SeqList*SeqL,int\)f{intj;if(SeqL->len==O)/*⊤h*/{printf("thelistisempty

5");return0;}elseif()/*'(st*/{printf("

6thepositionisinvalid");return-1;}else/*MNᑤ◀*/{*px=SeqL->data[i];/*ᑤ◀ᐗ{|}ᦪpxcd*/for(j=i+l;j<=SeqL->len;j++)/*ᐗS*/;/*⊤u17return1;}}3.!ឋ⊤ឋ⊤ᨵᱯ4.ᨵ&᦮x⊤L,ᐗU'(1VWX+1ᑡ`ZOH&ᐗy+ᐸX(ᙠ⊤ᔠ〉Ḅ'(+ᐸS☢Ḅᐗ;+☢Ḅᐗᙳᜧ,oᐗ஺gᙠhḄ1ᑜjCᑏᔠ〉Ḅᑁnaᡂo`Z஺voidpart(SeqList*L){/**/intx;;/*H&ᐗ(ᐭx*/for(i=2;i<=L->len;i++)if()/*Sᐗᐗ*/{L->data[O]=L->data[i];/*Sᐗᨚᙠ஺'(*/for(j=i-l;j>=l;j-)/*SᐗS☢ᡠᨵᐗ*/L->data[j+l]=L->data[j];/*SᐗU0'(ᑮᨬS☢*/}5.!᪀᪀Ḅ¡¢£ᔜ!¥.¦§⚪1.ᙠ᪀Ḅ¨©©ª⊤+¨©©ª«¬ᒹ®¯¨©°(no)ஹ²³(name)ஹ¨´(pro)ஹ©ª(sal),µ⚗«¬+g·ᑏ&a᦮Ḅ¦+O1¸¹¯(1)º»«¬⊤¯U¼½¾ᐭᡠᨵ¨©Ḅ«¬஺(3ᑖ)(2)ᑤ◀¯ÀÁ¨©°+ᑤ◀o¨©Ḅ«¬஺(6ᑖ)(3)Âᦋ¯t¨´y“ᦟᣴ”Ḅ¨©©ªv100஺(4ᑖ)

7È4ᙠÉÊᘤÈÌÍÎjÉÊᡠᨵ¨©Ḅᔜ⚗«¬஺È3ᑖÎÈ5ϦOÐᓫḄÒÓÔᵨOj¸¹஺È4ᑖÎᐗwxP⊤wxÁÖ᝞1¯typedefstruct{charno[8],name[10],pro[6];floatsal¯}DataType;typedefstruct{DataTypedata[MAXLEN+l]intlen;JSeqList;2.ØÙÚÛÜØÙᒹݯٰÈnoஹÙ³ÈnameஹÈnewnumஹÞßÈsumnumµ⚗«¬+·ᑏa᦮¦{|⊤¯È1ÎàWᓄ¯âᐭᨵḄᡠᨵØÙḄµ⚗«¬஺È3ᑖÎ2ãÙ¯ÛÜÙÛ=ä¹ã&Ü+᝞åßᨵoÙ+ᑣᐕçã▅éoÙḄ1,ᔲᑣÀêëìíÊ«¬஺È4ᑖÎ3îzï`¯ð§ßᡠᨵÙḄîñ஺îñyᡠᨵÙḄᓫîòOßḄóv¢஺È4ᑖÎ4ÉʯÉÊØÙÚᡠᨵôÙ«¬஺È3ᑖÎ5ϦOÐᓫḄÒÓÔᵨOj¸¹஺È4ᑖÎᐗwxP⊤wxÁÖ2ᑖ஺3.ᨵõ᦮x⊤LI,L2,ᐸᐗz⌴÷ᨵX+gÁÖo⊤ḄᐗwxP⊤wxÈ2ᑖΧO1øÁÖùᦪ¯1âᐭ⊤ᡠᨵᐗḄz஺È3ᑖÎÈ2⊤LI,L2ᔠéyᑮú᜜&⊤L3+L3Ḅᐗü⌴ᨵ᣸ᑡ஺8ᑖÎÈ3þê⊤ᐗḄz஺È3ᑖÎÏùᦪ{|ÔᵨOjùᦪõ⊤ḄᔠééÉÊᔠéå஺È4ᑖÎ4.ᨵ&¨©Ü«¬Úᳮ+¨©«¬ᒹݯ¨©°ஹ²³ஹឋÿᑏ᦮᝞পᐭᦪinput:ᐭ஺3ᑖ2ᑤ◀ᦪdelete:!"#,ᑤ◀%Ḅ஺5ᑖব(ᐭᦪinsertᎷ"⊤+ᢥ#ᓣ᣸ᑡ01!"234(ᐭ56ᯠᨵ஺96ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ4ᑖ஺5.ᨵ2FGHᒹJG#noீ:ᐵMுOPnameQRᡂTscore஺"EGHCDDataTypeUV⊤CDSeqList;1ᐭᦪinput:ᐭGH.93ᑖফYZᦪsearch01!"2FG#YZᐸQRᡂT\ᐸᡂT]^ᦪ_`a

8Zcᑮ_`-1஺95ᑖব(ᐭᦪinsertᎷ"⊤+GHᢥG#ᓣ᣸ᑡ01!"2GH34(ᐭ56ᯠᨵ஺96ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ4ᑖ஺6.eᨵ•FghḄijkl᝞⊤1ᡠn⊤1ghᖪpᖪp#ᖪpPqrsijt10110001uvw1.22010110002xy1.01010110003zy0.53010110004xyᑐ105ᑏ᦮1|ᐭ}ᱥ\ᐸᙠV⊤+஺94ᑖ஺2Ꮇ"ᖪpᢥ}#ᓣj01(ᐭ2ᖪp⌕ᢥ}#ᨵ(ᐭᑮ⊤+஺96ᑖ301!"2Fᖪp#YZᐸᖪpPqஹrsijt᝞jᙠ%ᖪp|_`1,ᔲᑣ_`0஺94ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ4ᑖ஺7.ᨵ2FᳮᒹJ#ஹᡝ:ஹᵯ#ṹஹ☢஺᝞9⌕ᵨV⊤jপᑏ2Fᓄᦪinput:ᐭw஺93ᑖ2ᑏ2Fᨨᵨ¡ᦪcost:01!"2#᪷£#¤¥Y¦Zᑮ§,_`¨©ªᨨᔲᑣ_`0,«!¬n஺¡?®¯ᡝ¨©ªᵨ=☢*4.5ᐗ/m2஺94ᑖ3ᑏ2᣸ᦪsortᢥ#ᓣ᣸ᑡ஺94ᑖ4ᑏ2Fᦪoutput:|ᡠᨵ☢³´90µ¶·¸ᡝḄPq஺93ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ4ᑖ஺8.ᨵ2FGHᒹJ:G#noீ:ᐵMுOPnameQRᡂTenglish,¡ºᡂTcomp,ᦪGᡂTmatho"EGHCDDataTypeUV⊤CDSeqList;পᐭwᦪinput:ᐭGHOPஹG#஺93ᑖ2ᐭᡂTinp_score!"»Pqᐭᡠᨵ¼w»ḄᡂT஺93ᑖবᑤ◀ᦪdelᎷ"⊤+GHG#ᓣ᣸ᑡ01!"2GHG#ᑤ◀%GH½¾ᑤ◀_`1,ᔲᑣ_`0஺96ᑖভ|ᦪoutput:|ᡠᨵ¼Ḅ஺2ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ4ᑖ஺9.eᨵ2Fᖪp⊤9ᒹÀᖪp#noஹᖪpPqnameஹᖪpijtcountᖪpᓫrprice;Á.

91}ᱥᐭᢥ}#ᨵ|ᐭGH஺93ᑖ92¤}ᳮ01|ᐭ2F}ᱥᙠ⊤+YZ%}ᱥajᙠÂ}ᱥᑣ\%}ᱥḄᦪtÃᑮ⊤+}ᱥᦪt+acjᙠ%}ᱥᑣ\%}ᱥᢥ᯿}ᱥ#ᨵ(ᐭᑮ⊤+஺10ᑖ3}ᱥ|:|ᡠᨵ}ᱥḄ஺92ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ3ᑖ஺10,eᨵ2Fᖪp⊤9ᒹÀᖪp#noஹᖪpPqnameஹᖪpijtcountᖪpᓫrprice;1}ᱥᐭᢥ}#ᨵ|ᐭ}ᱥ஺93ᑖ2}ᳮᦪ_`Å®ÆÇ%}ᱥḄÈÉ஺01|ᐭ2F}ᱥX,ᙠ⊤+YZ%}ᱥajᙠÂ}ᱥ«ijtᜧ´Ë´xḄᦪtᑣ\⊤+}ᱥḄijtÌÍxḄᦪt,¡◤ÏÐḄÈÉ_`aijtcÑᑣ!Ò¨Ḅ¬n_`0஺acjᙠ%}ᱥ,_`-1஺10ᑖ3}ᱥ|:|ᡠᨵ}ᱥḄ஺92ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ3ᑖ஺11.ᨵ2ÓᩭÕÖÕ©+ᦪ£ᒹÀᵨᡝPqஹ#ஹᵨÕtஹÕஹ©kl9©×Ø©Ù"Eᵨᡝᦪ£CDUV⊤CDe᝞ᦪᦪ1|ᐭᡠᨵᵨᡝḄPq#ᵨÕtᵨᡝP®“Û??”u®Þßà஺¯FᵨᡝḄÕ]^?Õ=ᵨÕt*0.59¡4஺ᵨᡝḄ©kláe®Ø©஺94ᑖᦪ2|ᐭᵨᡝ#YZᑮ%ᵨᡝ\%ᵨᡝḄ©kláe®©×஺94ᑖᦪ3e2F᣸ᦪ\ᐗâᢥ#ᨵ᣸ᑡ஺94ᑖᦪ4|ᡠᨵḄØ©ḄᵨᡝPq஺93ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ3ᑖ஺12.eᨵ2Fghᖪp⊤9ᒹÀᖪp#noஹᖪpPqnameஹᖪpijtamountᖪpᓫrprice;1}ᱥᐭ|ᐭ2ᢇ}ᱥ}#®“000”§Þß஺93ᑖ92Æᱥᳮ|ᐭaä}ᱥ}#ஹᦪt9ᓽæᡝᡠÆÇḄ}ᱥ}#®“000”§Þß|ᡠÆÇḄ¯F}ᱥ}#ஹPqஹᦪtஹᓫrஹÈÉ9ᓫr]^YZ4ᑮÈÉ=ᓫrXᦪtᨬ5|èḄrs஺910ᑖ93}ᱥ|:|ᡠᨵ}ᱥḄ஺2ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ3ᑖ஺13.ᨵ2GHᡂTᒹÀOPஹG#ஹᡂTஹPé;1|ᐭᡠᨵ¼OPஹG#ஹᡂTPéᓄ®0஺93ᑖ92!"2GHG#|ᐸᡂTacjᙠ%G#!Ò¨Ḅ┯ë¬n஺94ᑖ3\GHᢥᡂTᵫíᑮ³᣸\ᐸPéjᐭ%GHḄ“Pé”+஺6

10ᑖ94|ᡠᨵGHḄ஺92ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ3ᑖ஺14.GHὃïᳮ஺GHᒹÀOPஹG#ஹὃïkl9ðᑮஹñ»ஹᢥ§B»ᡂTUwéòóôõöéὃï஺¯F¼ᨵ20éὃï;91GHwᐭUᓄ|ᐭᡠᨵGHḄOPஹG#\¯F¼ḄὃïᡂT÷0,\ὃïéᦪø÷0஺93ᑖ92|ᐭὃïkl¯éB»|ᐭᩈéὃïõ2F¼ú6é|ᐭ¯F¼Ḅὃï஺94ᑖ93¡ὃïᡂT:ðᑮ40.5ᑖñ»40ᑖ½¾B»41ᑖ¡¯F¼ḄὃïᡂT஺95ᑖ4|ᡠᨵ¼ḄG#ஹOPஹὃïklஹὃïᡂT஺93ᑖ:ᦪ;<ᓫ>?@ᵨ;BCD"E2ᑖ:ᦪ3ᑖ஺ᐗâCD"E᝞typedefstruct{charname[10];/*name⊤nGHOP*/charno[12];/*no⊤nG#*/charkaoqin[21];/*kaoqin⊤n20éḄὃïq—ü»c--ðᑮz—ᢥ§B»*/intk;/*k⊤nòóὃïᑮõýéᓄ§\ᐸ÷®-1*/intscore;/*score⊤nὃïᡂT*/}DataType;aᨵDataTypex,ᑣx.kaoqinফ⊤nxḄõþéὃï஺15.ᨵ2FwᳮᒹJ#ஹOPஹÿᑏ᦮᝞পᐭᦪinput:ᐭ஺3ᑖফ!ᦋᦪmodify:#$%,'()*(ᑮ!ᦋᐸ*(-ᑮ#.┯012஺34ᑖব5ᐭᦪinsertᎷ$⊤8ᢥ%ᓣ᣸ᑡ=>#$?@A5ᐭBCᯠᨵ஺36ᑖ4F.ᦪoutput:F.ᡠᨵHḄ஺32ᑖJᦪKLᓫNOPᵨKRST$U2ᑖJᦪ3ᑖ஺16.ᨵ?VWXᡂZ[ᳮWXᒹ^W%ஹ`aஹᡂZᑏ᦮᝞পᐭᦪinput:ᐭWX஺33ᑖফ!ᦋᦪmodify:#$W%,'()WX*(ᑮ!ᦋᐸᡂZ*(-ᑮ#.┯012஺34ᑖব᣸ᦪsortbWXᢥᡂZᵫdᑮe᣸஺36ᑖ

114F.ᦪoutput:F.ᡠᨵHḄ஺32ᑖJᦪKLᓫNOPᵨKRST$U2ᑖJᦪ3ᑖ஺17.fg[hifgᒹ^g%3noஹga3nameஹjk3newnumஹlmjk3sumnumn⚗ᑏ᦮pqr⊤1stᓄᐭᨵḄᡠᨵfgḄn⚗஺33ᑖ2vm#$wgxḄg%xᦪk*(ᑮ)gb)gḄjkxmjkyzxḄᦪk*yBḄmjk{0,ᑣᑤ◀)g*(-ᑮ)gᑣ#.┯012஺39ᑖব22fg[ᡠᨵg஺32ᑖ4JKLᓫḄOPᵨKR஺34ᑖᐗSTxr⊤ST$U32ᑖ18.fg[hifgᒹ^g%3noஹga3nameஹjk3newnumஹlmjk3sumnumn⚗ᑏ᦮pqr⊤1stᓄᐭᨵḄᡠᨵfgḄn⚗஺33ᑖ32#$gaF.ᡠᨵ#$gaḄgḄ஺33ᑖ3m8ᡠᨵgḄ஺{ᡠᨵgḄᓫKmjkḄ஺6ᑖ422fg[ᡠᨵg஺32ᑖ5JKLᓫḄOPᵨKR஺34ᑖ6ᡂᐗST$Uxr⊤ST$U32ᑖ஺19.fg[hifgᒹ^g%3noஹga3nameஹjk3newnumஹlmjk3sumnumn⚗ᑏ᦮pqr⊤1stᓄᐭᨵḄᡠᨵfgḄn⚗஺33ᑖ32'(#$g%ᙠ⊤8'()g*jᙠᐸᔲᑣ0஺34ᑖ33g#$wVfgḄgaஹg%ஹᦪk*Ḅfg✂ᨵḄfgᑣ!ᦋᐸjklmjk*Ḅfg¡gᢥg%ᨵ5ᐭᑮ⊤8஺3Ꮇ$⊤8ᐗᢥg%ᓣ᣸ᑡ37ᑖ4JKLᓫḄOPᵨKR஺34ᑖ5ᡂᐗST$Uxr⊤ST$U32ᑖ஺20.WXW¢[ᳮ஺WXᒹ£`aஹW%ஹW¢ஹ¤W¢ஹ¥¢஺ᑏ᦮pqr⊤1stᓄᐭᡠᨵHḄ`aஹW%ஹW¢஺33ᑖ2¤¢FᐭW%x¤W¢¥¢=W¢-¤W¢஺35ᑖ3¨¤W¢©¥¢{ªᦪḄHF.ᐸ`aஹW%ஹ¥¢«ᡠᨵHḄ¥¢lᦪlḄ¥¢ᦪ¬KᦪḄNO36ᑖ4JKLᓫḄOPᵨKR஺34ᑖ5ᡂᐗST$Uxr⊤ST$U32ᑖ஺®1./*1,ᙠrj¯°᪀Ḅ²⊤8²ᒹ£%3noஹ`a3name

12)ஹ´(pro)ஹ²(sal)¶n⚗·ᑏ?᦮ḄK(1)¸¹⊤ᐭᡠᨵḄ஺(3ᑖ)(2)ᑤ◀#$%ᑤ◀)Ḅ஺(6ᑖ)(3)!ᦋ©´{“ᦟᣴ”Ḅ²100஺(4ᑖ)(4)ᙠ2ᘤ(¿À)R2ᡠᨵḄᔜ⚗஺(3ᑖ)(5)JKLᓫḄOPᵨKR஺(4ᑖ)*/#include#includeinclude#defineMAXLEN100typedefstruct{charno[8],name[10],pro[6];floatsal;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*ᐭᡠᨵḄ*/voidinput(SeqList*L){inti;printf("inputthelength

13");scanf("%d",&L->len);printf("inputno,name,pro,sal

14")for(i=l;i<=L->len;i++)scanf(',%s%s%s%f"L->data[i].noL->data[i].name,L->data[i].pro,&L->data[i].//sal);)/*#$%ᑤ◀)Ḅ*/voiddel(SeqList*L,DataTypex){intj,i=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*'(ᐗxᡠᙠ*/i++if(i>L->len)printf("notfind

15");else(for(j=i+l;j<=L->len;j++)/*ᑤ◀ᐗX*/L->data[j-l]=L->data[j];(L->len)—;

16/*©´{“ᦟᣴ”Ḅ²100*/voidmodify(SeqList*L)inti;for(i=l;i<=L>>len;i++)if(strcmp(L->data[i].proJᦟᣴ")ÅÅ0)L->data[i].sal+=100;}/*Lᓫ*/voidmenu()(printf("l-------------ᐭ

17“)printf("2-------------ᑤ◀

18“)printf("3-------------!ᦋ

19“);printf("4-------------F.

20“)printf("O-------------⌨.

21“)}voidmain()(SeqList*L;DataTypex;intselj;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

22");scanf("%d",&sel);switch(sel){casel:input(L);break;case2:printf("inputno

23");scanf(”Çs”,x.no);del(L,x);break;case3:modify(L);break;case4:for(i=l;i<=L->len;i++)printf("%10s%12s%8s%7.1f

24"L->data[i].no,L->data[i].nameL->data[i].p//roL->data[i].sal);z)}while(sel!=0);)

252./*2.fg[hifgᒹ^g%(no)ஹga(name)ஹjk(newnum)ஹlmjk(sumnum)n⚗ᑏ᦮pqr⊤(1)stᓄᐭᨵḄᡠᨵfgḄn⚗஺(3ᑖ)(2)ÈghighÉÈ?i᝞Êm8ᨵ)gᑣᐕÌÈ▅«@)gḄjky1,ᔲᑣ#.Î12஺(4ᑖ)(3)m8ᡠᨵgḄ஺{ᡠᨵgḄᓫKmjkḄ஺(4ᑖ)(4)22fg[ᡠᨵg஺(3ᑖ)(5)JKLᓫḄOPᵨKR஺(4ᑖ)ᐗSTxr⊤ST$U2ᑖ஺*/#includeinclude#include#defineMAXLEN100typedefstruct{charno[8],name[10];intnewnum,sumnum;floatprice;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*ᐭᡠᨵfgḄ*/voidinput(SeqList*L){inti;printf("inputthelength

26");scanf("%d",&L->len);printf("inputno,name,newnum,sumnum,price

27")for(i=l;i<=L->len;i++)scanf(,,%s%s%d%d%f"L->data[i].no,L->data[i].name&L->data[i].newnum,&L->da//ta[i].sumnum,&L->data[i].price);)/*Èg*/voidbrow(SeqList*L,DataTypex){inti=l;while(i<=L->len&&strcmp(L->data[i].nox.no)l=0)/*'(ᐗxᡠᙠ/*/i++if(i>L->len)printf("notfind

28");elseif(L->data[i].newnum>0)L->data[i].newnum-;

29elseprintf("thebookisbrown");)/**/floatvolue(SeqList*L){floatv=0;inti;for(i=l;i<=L->len;i++)v+=L->data[i].price*L->data[i].sumnum;returnv;)/*2*/voidoutput(SeqList*L){inti;printfC'no^name^newnum,sumnum,price

30");for(i=l;i<=L->len;i++)printf(',%10s%12s%5d%5d%7.2f

31"L->data[i].no,L->data[i].name,L->data[i].znewnum,L->data[i].sumnumL->data[i].price);/)/*Lᓫ*/voidmenu()(printf("l------------ᐭ

32“)printf("2------------Èg

33“)printf("3------------

34“)printf("4------------F.

35“);printf("O------------⌨.

36“))voidmain()(SeqList*L;DataTypex;intsei;floatv;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

37");scanf(u%d",&sel);switch(sel)

38casel:input(L);break;case2:printf("inputno

39");scanf("%s",x.no);brow(L,x);break;case3:v=volue(L);printf("thesumvulueis%10.2f

40",v);break;case4:output(L);break;)}while(sel!=O);)3./*ÏᨵÐV᦮Tr⊤LI,L2,ᐸᐗ⌴ÒᨵjÓ·$U)r⊤ḄᐗSTx⊤ST32ᑖÏKÔ$Uᦪ31ᐭr⊤8ᡠᨵᐗḄ஺33ᑖ32br⊤LI,L2ᔠ«{ᑮÖ᜜?Vr⊤L38L38ḄᐗØ⌴yᨵ᣸ᑡ஺8ᑖ33F.r⊤8ᐗḄ஺33ᑖJᦪpqPᵨKRᦪÐV⊤Ḅᔠ««2ᔠ«°Ê஺4ᑖ*/#includeinclude#defineMAXLEN100typedefstruct{intdata[MAXLEN+l];intlen;JSeqList;/*ᐭ*/voidinputSeqList*L{inti;printf"inputthelength

41";scanf”%d”,&L->len;printf"inputelement

42";fori=l;i<=L->len;i++scanf"%d&L->data[i];/*ᔠ«*/voidmergeSeqList*A,SeqList*B,SeqList*C

43{inti,j,k;i=l;j=l;k=l;while(i<=A->len&&j<=B->len)if(A->data[i]data[j])C->data[k++]=A->data[i++];elseC->data[k++]=B->data[j++];while(i<=A->len)C->data[k++]=A->data[i++];while(j<=B->len)C->data[k++]=B->data[j++];C->len=k-l;}/*2*/voidoutput(SeqList*L){inti;for(i=l;i<=L->len;i++)printf("%5d

44"L->data[i]);z/*Lᓫ*/voidmenu()(printf("l------------⊤1ᐭஹn")printf("2------------⊤2ᐭ

45“)printf("3------------ᔠ«

46");printf("4------------F.ᔠ«BḄ⊤

47“)printf("O------------⌨.

48“);)voidmain()(SeqList*L1/L2/L3;intsei;Ll=(SeqList*)malloc(sizeof(SeqList));Ll->len=O;L2=(SeqList*)malloc(sizeof(SeqList));L2->len=0;L3=(SeqList*)malloc(sizeof(SeqList));L3->len=0;do{menu();printf("inputyourselect

49u);scanf(H%d",&sel);switch(sel)case1:printf("inputlistl

50");

51input(Ll);break;case2:printf("inputIist2

52");input(L2);break;case3:merge(Ll,L2,L3);break;case4:output(L3);)}while(sel!=O);)4/*ᨵ?VÙi[ᳮᒹ^%ஹ`aஹឋÛᑏ᦮᝞পᐭᦪinput:ᐭ஺(3ᑖ)(2)ᑤ◀ᦪdelete:#$%ᑤ◀)Ḅ஺(5ᑖ)(3)5ᐭᦪinsertᎷ$⊤8ᢥ%ᓣ᣸ᑡ=>#$?@A5ᐭBCᯠᨵ஺(6ᑖ)JᦪKLᓫNOPᵨKRST$U2ᑖJᦪ4ᑖ஺*//include#include#includeftdefineMAXLEN100typedefstruct(ᵫ3ÜÝ8],^^^[10Þß3];/*à>áâTᦪãjÓáâäå◤çᵭ·?V*/}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*ᐭᡠᨵḄ*/voidinput(SeqList*L){inti;printf("inputthelength

53");scanf("%dH&L->len);zprintf("inputno,namexb

54");zfor(i=l;i<=L->len;i++)scanf("%s%s%s",L->data[i].no,L->data[i].name,L->data[i].xb);)/*'(*/

55intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*'(ᐗxᡠᙠ*/i++if(i>L->len)return0;returni;)/*#$%ᑤ◀)Ḅ*/voiddel(SeqList*L,DataTypex)i=search(L,x);if(i==0)printf("notfind

56");else(for(j=i+l;j<=L->len;j++)/*ᑤ◀ᐗX*/L->data[j-l]=L->data[j];(L->len)-;))/*5ᐭ*/voidins(SeqList*L,DataTypex)(inti,j;i=search(L,x);if(i==0)(i=l;/*'(5ᐭ*/while(i<=L->len&&strcmp(x,no,L->data[i].no)>0)i++for(j=L->len;j>=i;j-)L->data[j+l]=L->data[j];L->data[i]=x;L->len++;)elseprintf("theelementalreadyexist

57"))/*Lᓫ*/voidmenu()(printf("l------------ᐭ

58");printf("2------------'(

59");printf("3------------ᑤ◀

60");printf("4------------5ᐭ

61");

62printf("5------------F.

63“)printf("O------------⌨.

64"))voidmain()(SeqList*L;DataTypex;intselj;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf(Hinputyourselect

65");scanf(“%d”,&sel);switch(sel)(casel:input(L);break;case2:printf("inputno

66");scanf("%s",x.no);i=search(L,x);if(i==0)printf("notexsit

67");elseprintf("%10s%12s%4s

68"L->data[i].no,L->data[i].name,L->data[i].xb);/break;case3:printf(uinputno

69");scanf("%s",x.no);del(Lx);break;zcase4:printf("inputno,name,xb

70");scanf(,,%s%s%s"x.no,x.namex.xb);//ins(L,x);break;case5:for(i=l;i<=L->len;i++)printf("%10s%12s%4s

71"L->data[i].no,L->data[i].nameL->data[i].xb);/z)}while(sel!=O);}5./*ᨵ?VWXᒹ^W%noீJᐵáு`anameíîᡂZscore஺$UWXSTDataTypexr⊤STSeqList;(1)ᐭᦪinput:ᐭWX஺(3ᑖ)(2)'(ᦪsearch=>#$?VW%'(ᐸíîᡂZbᐸᡂZpqᦪ*(-ᑮ(5ᑖ)

72ব5ᐭᦪinsertᎷ$⊤8WXᢥW%ᓣ᣸ᑡ=>#$?WX@A5ᐭBCᯠᨵ஺(6ᑖ)JᦪKLᓫNOPᵨKRST$U2ᑖJᦪ4ᑖ஺*/#includeinclude#include#defineMAXLEN100typedefstruct{charno[8],name[10];intscore;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*ᐭᡠᨵWXḄ*/voidinput(SeqList*L){inti;printf("inputthelength

73");scanf("%d",&L->len);printf("inputno,name,score

74");for(i=l;i<=L->len;i++)scanf("%s%s%d",L->data[i].no,L->data[i].name,&L->data[i].score);)/*'(*/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*'(ᐗxᡠᙠ*/i++if(i>L->len)return-1;returnL->data[i],score;)/*5ᐭWX*/voidins(SeqList*L,DataTypex)(inti,j;i=search(L,x);if(i==-l)(i=l;/*'(5ᐭ*/while(i<=L->len&&strcmp(x,no,L->data[i].no)>0)i++

75for(j=L->len;j>=i;j-)L->data[j+l]=L->data[j];L->data[i]=x;L->len++;)elseprintf("theelementalreadyexist

76");)/*Lᓫ*/voidmenu()(printf("l------------ᐭ

77")printf("2------------'(

78");printf("3------------5ᐭ

79“)printf("4------------F.

80")printf("O------------⌨.

81“))voidmain()(SeqUst*L;DataTypex;intsel,sj;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

82");scanf("%d",&sel);switch(sel)(casel:input(L);break;case2:printf("inputno

83");scanf("%s",x.no);s=search(L,x);if(s==-l)printf("notexsit

84");elseprintf("thescoreis%5d

85"s);/break;case3:printf(uinputno,name,score

86");scanf("%s%s%d"x.nox.name,&x,score);//ins(L,x);break;case4:for(i=l;i<=L>>len;i++)printf("%10s%12s%5d

87"L->data[i].no,L->data[i].nameL->data[i].score);/z)

88}while(sel!=O);)6./*Ïᨵ?VïðḄmjñò᝞⊤1ᡠ2⊤1ïðᖪôᖪô%ᖪôa´õmjk10110001ö÷i1.22010110002øù1.01010110003úù0.53010110004øùᑐ105ᑏ᦮(1)Fᐭüᱥ«bᐸÓᙠr⊤8஺(4ᑖ)஺(2)Ꮇ$ᖪôᢥü%ᓣjÓ=>5ᐭ?ᖪô⌕ÿᢥᨵᐭᑮ⊤஺(6ᑖ)(3)ᖪᐸᖪஹ!"#᝞%"ᙠ'ᖪ()*+,1,ᔲᑣ+,0஺(4ᑖ)/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ4ᑖ஺7#include#include#include#defineMAXLEN100typedefstruct{charno[8],name[10];floatprice;intamount;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*ABCDᐭᡠᨵᱥḄHI*/voidinput(SeqList*L){inti;printf("inputthelength

89");scanf("%d",&L->len);printf("inputno,name,price,amount

90");for(i=l;i<=L->len;i++)scanf("%s%s%f%d"L->data[i].no,L->data[i].name&L->data[i].price,&L->data[//

91i].amount);)/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&astrcmp(L->data[i].nox.no)>=0)/*ᐗLxᡠᙠMN*/zi++Oif(i>L->len)return0;returni;)/*ᐭᱥHI*/voidins(SeqList*LDataTypex)z(intij;i=search(Lx);zif(i==0)(i=l;/*ᐭMN*/while(i<=L->len&&strcmp(x.no,L->data[i].no)>0)i++;for(j=L->len;j>=i;j-)L->data[j+l]=L->data[j];L->data[i]=x;L->len++;}elseprintf("theelementalreadyexist

92")O)/*3ᓫ*/voidmenu(){printf("l------------PᐭHI

93“)Oprintf("2------------

94“)Oprintf("3------------ᐭ

95“);printf("4------------()

96“)Oprintf("O------------⌨)

97");)voidmain()(SeqList*L;DataTypex;intselj;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do

98{menu();printf("inputyourselect

99H);scanf("%d",&sel);switch(sel)(casel:input(L);break;case2:printf("inputno

100");scanf("%s"x.no);zi=search(L,x);if(i==0)printf("notexsit

101");elseprintf("%10s%12s%7.2f%5d

102"L->data[i].noL->data[i].nameL->data[i].pri,z/ce,L->data[i].amount);break;case3:printf("inputno,name,price,amount'n”)Oscanf("%s%s%f%d"x.nox.name&x.price,&x,amount);z//ins(L,x);break;case4:for(i=l;i<=L->len;i++)printf(,,%10s%12s%7.2f%5d

103"L->data[i].no,L->data[i].name,L->data[i].p/rice,L->data[i],amount);}}while(sel!=O);}7./*ᨵRSHITᳮVWRSHIᒹYZ[\ஹᡝ/ஹᵯ_ṹஹ☢b஺cde᝞f:;g⌕iᵨj⊤"klZপᑏopᓄ0ᦪinput:ABCDᐭRSrsHI஺3ᑖ2ᑏ•uᨨwᵨxy0ᦪcost:[\᪷{[\|}~ᑮ+,uᨨwᔲᑣ+,0,*)HI஺xy6Zᡝwᵨ☢b*4.5ᐗ/m2஺஺g4ᑖlg3ᑏ᣸0ᦪsortZᢥ[\ᓣ᣸ᑡ஺g4ᑖl4ᑏ0ᦪ஺utput:()ᡠᨵ☢b90ᡝḄ஺g3ᑖl/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ4ᑖ஺*/#include#include#includeftdefineMAXLEN100typedefstruct{charno[6],name[10];floatarea;

104chartel[15];}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*ABCDᐭᡠᨵRḄHI*/voidinput(SeqList*L){inti;printf(Hinputthelength

105");scanf("%d"&L->len);zprintf("inputno,name,area,tel

106“)Ofor(i=l;i<=L->len;i++)scanf("%s%s%f%s"L->data[i].noL->data[i].name&L->data[i].area&L->data[i////)/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*ᐗLxᡠᙠMN*/i++Oif(i>L->len)return0;returni;}/*xyuᨨw*/floatcost(SeqList*L,DataTypex)(inti;i=search(L,x);if(i==0)return0;elsereturn(L->data[i].area*4.5);)/*᣸*/voidsort(SeqList*L)(intij,n;n=L->len;for(i=2;i<=n;i++)/*᜜ᑴ᣸Ḅᦪ*/(L->data[O]=L->data[i];j=i-l;while(strcmp(L->data[0].no,L->data[j].no)<0){L->data[j+l]=L->data[j];j-O}//while

107L->data[j+l]=L->data[O];))/*()*/voidoutput(SeqList*L)(inti;for(i=l;i<=L->len;i++)printf("%10s%12s%7.2f%15s

108HL->data[i].no,L->clata[i].name,L->data[i].areza,L->data[i].tel);)/*3ᓫ*/voidmenu()(printf("l-------------PᐭHI

109")Oprintf("2-------------xyuᨨw

110“)Oprintf("3-------------᣸

111“);printf("4-------------()

112“)Oprintf("O-------------⌨)

113“)O)voidmain()(SeqList*L;DataTypex;intsei;floatx_cost;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

114H);scanf("%d",&sel);switch(sel)(casel:input(L);break;case2:printf(Hinputno

115");scanf("%sx.no);x_cost=cost(L,x);if(x_cost==0)printf(Hnotexsit

116");elseprintf(,,%10s%7.2f%

117",x.no,x_cost);break;case3:sort(L);

118break;case4:output(L);break;)}while(sel!=O);)8./*ᨵHIᒹYZn஺ீ/ᐵBுOnameO¡ᡂ£english,xy¤ᡂ£comp,ᦪᡂ£matho>HI<=DataType¥j⊤<=SeqList;(1)PᐭrsHI0ᦪinput:ABCDᐭஹ஺(3ᑖ)(2)Pᐭᡂ£inp_scoreZ¦cPᐭᡠᨵ§s[¦Ḅᡂ£஺(3ᑖ)বᑤ◀0ᦪdelZᎷ⊤HIᓣ᣸ᑡᑤ◀'HI¬ᑤ◀+,1,ᔲᑣ+,0஺(6ᑖ)(4)()0ᦪoutput:()ᡠᨵ§ḄHI஺(2ᑖ)/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ4ᑖ஺*/include#includeinclude#defineMAXLEN100typedefstructstudent/*>ᐗLᦪ{<=DataType*/(charname[10],no[10];intmath,eng,comp;JDataType;typedefstruct/*>j⊤<=SeqList*/{DataTypedata[MAXLEN];intlen;}SeqList;voidmenu();voidinput(SeqList*L);voidinp_score(SeqList*L);voidseq_del(SeqList*SeqL,DataTypex);voidoutput(SeqList*L);voidmain(){SeqList*SeqLStu;/*/0ᦪHIj⊤ᵨSeqLStu⊤*/DataTypex;intsei;SeqLStu=(SeqList*)malloc(sizeof(SeqList));if(SeqLStu==NULL)exit(O);

119SeqLStu->len=O;/*®⊤opᓄ¯⊤*/do{menu();printf("

120inputyourchoice:");/*(ᐭᡠ⌱±Ḅ:;*/scanf("%d"&sel);zswitch(sei){case1:input(SeqLStu);break;case2:inp_score(SeqLStu);break;case3:printf("

121pleaseinputelementno

122")Oscanf(“%sx.no);seq_del(SeqLStu,x);break;case4:output(SeqLStu);break;case0:exit(0);)}while(sel!=0);)/*3ᓫ0ᦪ*/voidmenu(){printf("

123l...........Pᐭ

124“)Oprintf("2..............Pᐭᡂ£

125“)Oprintf("3..............ᑤ◀

126“)Oprintf("4..............²

127”);printf("O..............⌨)

128“)O)/*(ᐭஹ*/voidinput(SeqList*L){inti;printf(H

129initalizing............

130");printf("

131inputthelist'slength:")Oscanf("%d"&L->len);zgetchar();for(i=l;i<=L->len;i++){printf("enterno,name

132");scanf("%s%s"L->data[i].noL->data[i].name);/zL->data[i].math=O;L->data[i].comp=0;L->data[i].eng=O;)}/*(ᐭᡂ£*/voidinp_score(SeqList*L)inti;

133charkch[20];printf("inputthecoursename

134");scanf("%s",kch);if(strcmp(kchjmath")==0)/*³´µ¶*/(printf("

135inputthemathscore

136");for(i=l;i<=L->len;i++)scanf("%d"&L->data[i].math);z)elseif(strcmp(kch,"eng")==0){printf("

137inputtheenglishscore

138");for(i=l;i<=L->len;i++)scanf("%d",&L->data[i].eng);}elseif(strcmp(kch,“comp")==0){printf("

139inputthecomputerscore

140");for(i=l;i<=L->len;i++)scanf("%d”,&L->data[i].comp);}elseprintf("

141thenameiserror

142");)/*ᑤ◀ᐗL*/voidseq_del(SeqList*L,DataTypex)(inti=l,j;/*ᐗLx*/while(i<=L->len&&strcmp(x.no,L->data[i].no)>0)i++;if(i<=L->len&&strcmp(x.no,L>data[i].no)=0)/*ᑮx,ᑣᑤ◀x*/(for(j=i+l;j<=L->len;j++)L->data}l]=L->data[j];/*ᐗL·¸*/(L->len)-;/*⊤¹º1*/)elseprintf("xnotexist

143");)/*()0ᦪ*/voidoutput(SeqList*L)(inti=l;for(i=l;i<=L->len;i++)printf("%12s;%10s;%8d;%8d;%8d\rT,L>data[i].no,L->data[i].name,L>data[i].math,L->data[i].eng,L->data[i].comp);

144)9./*»ᨵ-ᖪHI⊤(ᒹ½ᖪnoஹᖪnameஹᖪ!"#countᖪᓫPrice)cde2f:;Z(1)ᱥHIPᐭZᢥᨵ(ᐭHI஺(3ᑖ)(2)|TᳮZ(ᐭᱥHIᙠ⊤'ᱥ¾"ᙠ¿ᱥᑣ®'ᱥḄᦪ#Àᑮ⊤ᱥᦪ#O¾Á"ᙠ'ᱥᑣ®'ᱥHIᢥ᯿ᱥᨵᐭᑮ⊤஺(10ᑖ)(3)ᱥHI():()ᡠᨵᱥḄHI஺(2ᑖ)/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ3ᑖ஺*/includeincludeinclude#defineMAXLEN100typedefstructstudent/*>ᐗLᦪ{<=DataType*/(charname[10],no[10];intamount;JDataType;typedefstruct/*>j⊤<=SeqList*/{DataTypedata[MAXLEN];intlen;JSeqList;voidmenu();voidinput(SeqList*L);voidruku(SeqList*L,DataTypex);voidoutput(SeqList*L);intsearch(SeqList*LDataTypex);zvoidmain(){SeqList*L;/*/0ᦪᱥj⊤ᵨL⊤*/DataTypex;intsei;L=(SeqList*)malloc(sizeof(SeqList));if(L==NULL)exit(O);L->len=0;/*®⊤opᓄ¯⊤*/do{menu();printf("

145inputyourchoice:");/*(ᐭᡠ⌱±Ḅ:;*/

146scanf(“%d”,&sel);switch(sei){case1:input(L);break;case2:printf(H

147inputelementno,name,amountiang

148");scanf("%s%s%d"x.no,x.name,&x.amount);zruku(L,x);break;case3:output(L);break;case0:exit(O);)}while(sel!=0);)/*3ᓫ0ᦪ*/voidmenu(){printf("

149l...........PᐭᱥHI

150");printf("2.............ᐭ!

151“)Oprintf("3.............²

152“)Oprintf(nO.............⌨)

153“)O}/*PᐭᱥHI*/voidinput(SeqUst*L){inti;printf("

154initalizing............

155");printf("

156inputthelist'slengthscanf(“%d”,&L->len);getchar();for(i=l;i<=L->len;i++){printf("enterno,name,amount

157“)Oscanf("%s%s%d"L->data[i].noL->data[i].name,&L->data[i].amount);z/)}/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&astrcmp(L->data[i].nox.no)!=0)/*ᐗLxᡠᙠMN*/zi++;if(i>L->len)return0;returni;)/*ᐭ!*/

158voidruku(SeqList*LDataTypex)z(inti,j;i=search(L,x);if(i==0){i=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)<0)/*ᐭMN*/i++Ofor(j=L->len;j>=i;j-)L->data[j+l]=L->data[j];L->data[i]=x;L->len++O)elseL->data[i].amount+=x.amount;)/*()0ᦪ*/voidoutput(SeqList*L)(inti=l;for(i=l;i<=L->len;i++)printf(”Ä12s;%12s;%8d

159”,L->data[i].no,L->data[i].name,L->data[i].amount);10./*»ᨵᖪHI⊤gᒹ½ᖪnoஹᖪnameஹᖪ!"#countᖪᓫpricecde2f:;Z1ᱥHIPᐭZᢥᨵ(ᐭᱥHI஺g3ᑖlg2)TᳮZ0ᦪ+,ÅÆÇ'ᱥḄÈÉ஺(ᐭᱥHIx,ᙠ⊤'ᱥ¾"ᙠ¿ᱥ!"#ᜧËxḄᦪ#ᑣ®⊤ᱥḄ!"#ºÌxḄᦪ#,xy)◤ÏÐḄÈÉ*+,O¾!"#ÁÑᑣ)ÒḄ*+,0஺¾Á"ᙠ'ᱥ,+,-1஺10ᑖlg3ᱥHI():()ᡠᨵᱥḄHI஺2ᑖl/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ3ᑖ஺*///includeinclude

160#include#defineMAXLEN100typedefstructstudent/*>ᐗLᦪ{<=DataType*/(charname[10],no[10];floatprice;intamount;}DataType;typedefstruct/*>j⊤<=SeqList*/{DataTypedata[MAXLEN];intlen;JSeqList;voidmenu();voidinput(SeqList*L);floatchuku(SeqList*LDataTypex);zvoidoutput(SeqList*L);intsearch(SeqList*L,DataTypex);voidmain(){SeqList*L;/*/0ᦪᱥj⊤ᵨL⊤*/DataTypex;intsei;floatcost;L=(SeqList*)malloc(sizeof(SeqList));if(L==NULL)exit(0);L->len=0;/*®⊤opᓄ¯⊤*/do{menu();printf("

161inputyourchoice:");/*(ᐭᡠ⌱±Ḅ:;*/scanf("%d"&sel);zswitch(sei){case1:input(L);break;case2:printf("

162inputelementno,name,amount

163")Oscanf("%s%s%d”,x.no,x.name,&x.amount);cost=chuku(L,x);if(cost>0)printf("cost:%8.2f

164"cost);,break;case3:output(L);break;case0:exit(0);)Jwhile(sel!=0);)/*3ᓫ0ᦪ*/voidmenu(){printf("

165l...........PᐭᱥHI

166");

167printf("2.............)!

168“)Oprintf("3.............²

169“)Oprintf("O.............⌨)

170");)/*PᐭᱥHI*/voidinput(SeqList*L){inti;printf("

171initalizing............

172");printf("

173inputthelist'slengthscanf("%d",&L->len);getchar();for(i=l;i<=L->len;i++){printf("enterno,name,amount,price

174");scanf("%s%s%d%f",L->data[i].no,L->data[i].name,&L->data[i].amount,&L->data[i].price);})/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&astrcmp(L->data[i].nox.no)>=0)/*ᐗLxᡠᙠMN*/zi++;if(i>L->len)return0;returni;)/*)!*/floatchuku(SeqList*L,DataTypex)(inti;i=search(L,x);if(i==0){printf("thiselementnotexist

175")Oreturn-1;}elseif(L->data[i].amount>=x.amount){L->data[i].amount-=x.amount;returnx.amount*L->data[i].price;)else{printf("theamountisnotenough

176");return0;}}

177/*()0ᦪ*/voidoutput(SeqList*L)(inti=l;printf("nonamepriceamount

178H);for(i=l;i<=L->len;i++)printf("%-12s%-12s%-7.2f%-8d

179"L->data[i].noL->data[i].nameL-z//>data[i].price,L->data[i].amount);IL/*ᨵÓᩭÕÖÕwwVWᦪ{HIᒹ½ZᵨᡝஹஹᵨÕ#ஹÕwஹw×Ø(ÙÚ)Û>ᵨᡝHIᦪ{<=¥j⊤<=*»x᝞f0ᦪZ0ᦪ1:(ᐭᡠᨵᵨᡝḄᵨÕ#ᵨᡝ"???"Þßà³஺ᵨᡝḄÕwáâ6ZÕw=ᵨÕ#*0.59xyä)஺ᵨᡝḄw×Øå»Ú஺(4ᑖ)0ᦪ2Z(ᐭᵨᡝᑮ'ᵨᡝHI*®'ᵨᡝḄw×Øå»Ù஺(4ᑖ)0ᦪ3Z»x᣸0ᦪ®ᐗLHIᢥᨵ᣸ᑡ஺(4ᑖ)0ᦪ4Z(HIᡠᨵḄÚwḄᵨᡝ஺(3ᑖ)/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ3ᑖ*/#includeinclude#include#defineMAXLEN100typedefstructstudent/*>ᐗLᦪ{<=DataType*/(charname[10],no[10];floatamount,money;intpay;JDataType;typedefstruct/*>j⊤<=SeqList*/{DataTypedata[MAXLEN];intlen;JSeqList;voidmenu();voidinput(SeqList*L);voidoutputl(SeqList*L);voidoutput2(SeqList*L);intsearch(SeqList*L,DataTypex);voidsort(SeqList*L);

180voidmain(){SeqList*L;/*/0ᦪᱥj⊤ᵨL⊤*/intselj;DataTypex;L=(SeqList*)malloc(sizeof(SeqList));if(L==NULL)exit(O);L->len=0;/*®⊤opᓄ¯⊤*/do{menu();printf("

181inputyourchoice:");/*(ᐭᡠ⌱±Ḅ:;*/scanf("%d"&sel);zswitch(sei){case1:input(L);break;case2:printf("

182inputtheno

183");scanf("Äs”,x.no);i=search(Lx);/if(i!=0)L->data[i].pay=l;elseprintf("tnenoiserror

184H);break;case3:sort(L);break;case4:output2(L);break;case5:outputl(L);break;case0:exit(O);)}while(sel!=0);)/*3ᓫ0ᦪ*/voidmenu(){printf("

185l...........PᐭᵨᡝHI

186“)Oprintf("2..............w

187“)Oprintf("3..............᣸

188“)Oprintf("4..............()Úw§

189“)Oprintf("5..............²

190")Oprintf("O..............⌨)

191“)O}/*PᐭᵨᡝHI*/voidinput(SeqList*L){inti=0;DataTypex;printf("

192initalizing............

193");printf("

194inputtheno

195");scanf("%s",x.no);

196while(strcmp(x.no,"???")!=0){printf("inputnameamount

197");zscanf("%s%f"x.name&x.amount);//x.money=x.amount*0.59;x.pay=0;i++;L->data[i]=x;printf("inputtheno

198");scanf("%s"x.no);z}L->len=i;)/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&&strcmp(L->data[i].nox.no)!=0)/*ᐗLxᡠᙠMN*//i++Oif(i>L->len)return0;returni;}/*᣸*/voidsort(SeqList*L)(intij;for(i=2;i<=L->len;i++){L->data[0]=L->data[i];j=i-lOwhile(strcmp(L->data[0].no,L->data[j].no)<0){L->data[j+l]=L->data[j];j-O}L->data[j+l]=L->data[O];})/*()0ᦪ*/voidoutputl(SeqList*L)(inti;printf("nonameamountmoneypay

199");for(i=l;i<=L->len;i++)printf("%-12s%-12s%-7.2f%-7.2f%2d

200",L->data[i].noL->data[i].namez,L->data[i].amount,L->data[i].moneyL->data[i].pay);z

201)/*()ÚwḄᵨᡝ*/voidoutput2(SeqUst*L)(inti;for(i=l;i<=L->len;i++)if(L->data[i].pay==O)printf(u%-12s%

202"L->data[i].name);/12./*»ᨵæçᖪHI⊤gᒹ½ᖪnoஹᖪnameஹᖪ!"#amountᖪᓫpricecde2f:;Z1ᱥHIPᐭZ(ᐭᢇᱥHI“000”ßà஺g3ᑖlg2ÆᱥTᳮZ(ᐭ¾êᱥஹᦪ#gᓽìᡝᡠÆÇḄᱥHIl“000”ßà()ᡠÆÇḄᱥஹஹᦪ#ஹᓫஹÈÉgᓫáâäᑮÈÉᓫ>ᦪ#lOᨬî()Ḅ஺g10ᑖlg3ᱥHI():()ᡠᨵᱥḄHI஺g2ᑖl/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ3ᑖ஺*/#include#includeinclude#defineMAXLEN100typedefstructstudent/*>ᐗLᦪ{<=DataType*/charname[10]no[10];zfloatprice;intamount;JDataType;typedefstruct/*>j⊤<=SeqList*/{DataTypedata[MAXLEN];intlen;JSeqList;voidmenu();voidinput(SeqList*L);voidcost_menu(SeqList*L);

203voidoutput(SeqList*L);intsearch(SeqList*L,DataTypex);voidmain(){SeqList*L;/*/0ᦪᱥj⊤ᵨL⊤*/intsei;L=(SeqList*)malloc(sizeof(SeqList));if(L==NULL)exit(O);L->len=0;/*®⊤opᓄ¯⊤*/do{menu();printf(u

204inputyourchoice:");/*(ᐭᡠ⌱±Ḅ:;*/scanf("%d”,&sel);switch(sei){case1:input(L);break;case2:cost_menu(L);break;case3:output(L);break;case0:exit(O);)Jwhile(sel!=0);)/*3ᓫ0ᦪ*/voidmenu(){printf("

205l..........PᐭᱥHI

206");printf("2.............)!

207“)Oprintf("3.............²

208“)Oprintf("O.............⌨)

209“)O}/*PᐭᱥHI*/voidinput(SeqList*L){inti=0;DataTypex;printf("

210initalizing............

211");printf("

212inputtheno

213");scanf("Äs”,x.no);while(strcmp(x.no,"000")!=0){printf("inputname,amount,price

214u);scanf("%s%d%f"x.name,&x.amount,&x.price);zi++;L->data[i]=x;printf("inputtheno

215");scanf(,"%s"x.no);/}

216L->len=i;)/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&&strcmp(L->data[i].nox.no)!=0)/*ᐗLxᡠᙠMN*/zi++Oif(i>L->len)return0;returni;)/*ïᓫᡭᓺ*/voidcost_menu(SeqList*L)(intik=OJ;zDataTypexa[MAXLEN];zfloatcost=0;printf("inputtheno

217");scanf(”Äs”,x.no);while(strcmp(x.noO'000")!=0){i=search(L,x);if(i==0)printf("thisnoiserror

218");else(printf("inputamount

219H);scanf("%d",&x.amount);if(x.amount>L->data[i].amount)printf("theamounterror

220");else{L->data[i].amount-=x.amount;/*òᦋ!"ᦪ#*/x.price=L->data[i].price;strcpy(x.name,L->data[i].name);k++Oa[k]=x;/*®ᡠÆÇḄᱥHIôᙠᦪõa*/))printf("inputtheno

221");scanf("%s",x.no);)printf("ᓫᦪ#ÈÉ

222“)Ofor(j=l;j<=k;j++){printf("%-12s%-12s%-6.1f%-6d%-7.1f

223",a[j].no,a[j].name,a[j].price,a[j].amount,a[j].price*a[j].amount);cost+=a[j].price*a[j].amount;

224)printf(”ÐÈÉZ%7.1f

225",cost);)/*()0ᦪ*/voidoutput(SeqList*L)(inti;printf("nonamepriceamount

226");for(i=l;i<=L->len;i++)printf("%-12s%-12s%-7.2f%-8d

227",L->data[i].noL->data[i].nameL->d//ata[i].price,L->data[i].amount);)13./*ᨵᡂ£HIᒹ½Zஹஹᡂ£ஹöOcde2f:;Zg1l(ᐭᡠᨵ§ஹஹᡂ£öopᓄ0஺g3ᑖlg2()ᐸᡂ£¾Á"ᙠ')ÒḄ┯ø஺g4ᑖl3®HIᢥᡂ£ᵫúᑮ᣸*®ᐸö"ᐭ'HIḄ“ö“஺g6ᑖg4()ᡠᨵḄHI஺g2ᑖl/0ᦪ23ᓫ567ᵨ29:;<=>2ᑖ/0ᦪ3ᑖ஺*/includeinclude#include#defineMAXLEN100typedefstructstudent/*>ᐗLᦪ{<=DataType*/charname[10],no[10];intscore/ank;JDataType;typedefstruct/*>j⊤<=SeqList*/{DataTypedata[MAXLEN];intlen;JSeqList;voidmenu;voidinputSeqList*L;intsearchSeqList*L,DataTypex;voidsortSeqList*L;voidoutputSeqList*L;

228voidmain(){SeqList*SeqLStu;/*/0ᦪHIj⊤ᵨSeqLStu⊤*/DataTypex;intselj;SeqLStu=(SeqList*)malloc(sizeof(SeqList));if(SeqLStu==NULL)exit(O);SeqLStu->len=O;/*®⊤opᓄ¯⊤*/do{menu();printf("

229inputyourchoice:");/*(ᐭᡠ⌱±Ḅ:;*/scanf("%d",&sel);switch(sei)(case1:input(SeqLStu);break;case2:printf("inputno

230");scanf("%s,,x.no);/i=search(SeqLStux);?if(i==O)printf("thenoiserror

231");elseprintf("score=%d",SeqLStu->data[i].score);break;case3:sort(SeqLStu);break;case4:output(SeqLStu);break;case0:exit(0);}Jwhile(sel!=0);)/*3ᓫ0ᦪ*/voidmenu(){printf("

232l...........PᐭHI

233");printf("2.............

234“)Oprintf("3.............᣸

235“)Oprintf(H4.............²

236“)Oprintf("O.............⌨)

237“)O)/*(ᐭஹஹᡂ£*/voidinput(SeqList*L){inti;printf("

238initalizing............

239");printf("

240inputthelist'slengthscanf("%dH&L->len);zgetchar();for(i=l;i<=L->len;i++)

241{printf(Henterno,name,score

242");scanf("%s%s%d",L->data[i].no,L->data[i].name&L->data[i].score)//L->data[i].rank=O;})/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*ᐗLxᡠᙠMN*/i++Oif(i>L->len)return0;returni;)/*᣸*/voidsort(SeqList*L)(intij;for(i=2;i<=L->len;i++){L->data[0]=L->data[i];j=i-lOwhile(L->data[0].score>L->data[j].score){L->data[j+l]=L->data[j];j-O)L->data[j+l]=L->data[O];)for(i=l;i<=L->len;i++)L->data[i].rank=i;)/*()0ᦪ*/voidoutput(SeqList*L)(inti=l;for(i=l;i<=L->len;i++)printf("%12s;%10s;%5d%3d

243"L->data[i].no,L->data[i].name,L->data[i].sc/ore,L->data[i].rank);)14./*ὃýTᳮ஺HIᒹ½Zஹஹὃý×Øgþᑮஹÿஹᢥ,ᡂὃ஺ᨵ20ὃ

244!(1)"#$%&'ᐭ)*ᓄ!,ᐭᡠᨵ"#Ḅ/0ஹ"123Ḅὃᡂ40,3ὃᦪ640஺(3ᑖ)(2),ᐭὃ:;!2,ᐭὃ2<=>*2?,ᐭḄὃ஺(4ᑖ)(3)@Aὃᡂ:CᑮE0.5ᑖ2FE஺ᑖ2GHE1ᑖ2@AḄὃᡂo(5ᑖ)(4),IᡠᨵḄ"1ஹ/0ஹὃ:;ஹὃᡂ஺(3ᑖ)JKᦪLᓫNOPᵨ2RSTU2ᑖ2JKᦪ3ᑖ஺*/include#includeinclude#defineMAXLEN100typedefstruct{charname[10];/*name⊤Y"#/0*/charno[12];/*no⊤Y"1*/charkaoqin[21];/*kaoqin⊤Y20Ḅὃ2q—[2c—Cᑮ2k--F*/intk;/*k⊤Yὃᑮ2)*ᓄ3ᐸ4]0*1floatscore;/*score⊤Yὃᡂ*/}DataType;typedefstruct/*TU^_⊤RSSeqList*/{DataTypedata[MAXLEN];intlen;JSeqList;voidmenu();voidinput(SeqList*L);voidkaoqin(SeqList*L);voidscore(SeqList*L);voidoutput(SeqList*L);voidmain(){SeqList*L;/*JKᦪ`2aᱥ^_⊤ᵨL⊤Y*/intsei;L=(SeqList*)malloc(sizeof(SeqList));if(L==NULL)exit(O);L->len=0;/*3⊤)*ᓄ]=c⊤*/do{menu();printf("

245inputyourchoice:");/*,ᐭᡠ⌱eḄ1*/

246scanf("%d",&sel);switch(sei){case1:input(L);break;case2:kaoqin(L);break;case3:score(L);break;case4:output(L);break;case0:exit(0);)}while(sel!=0);)/*LᓫKᦪ*/voidmenu(){printf("

247l............'ᐭ"#%&

248“)printf("2..............ὃ

249“)printf(-3..............@Aὃᡂ

250");printf("4..............fY

251");printff'O..............⌨I

252");)/*'ᐭ"#/0ஹ"1*/voidinput(SeqList*L){inti=0;printf(",ᐭᐗjᦪஹn");scanf("%d"&L->len);;printf("

253,ᐭ"1ஹ/0

254");for(i=l;i<=L->len;i++)|scanf("%s%s",L->data[i].no,L->data[i].name);L->data[i].k=-l;/*k>*ὃ*/L->data[i].score=0;})/*,ᐭὃ*/voidkaoqin(SeqList*L)(intij;printf(",ᐭὃ2q--[2c=Cᑮ2z--ᢥ

255");getchar();for(i=l;i<=L->len;i++)

256{L->data[i].k++;/*ὃᑮk*/j=L->data[i].k;L->data[i].kaoqin[j]=getchar();/*,ᐭiḄjὃ*/))/*ὃᡂ@A*/voidscore(SeqList*L){charq;intij;for(i=l;i<=L->len;i++)for(j=O;j<=L->data[i].k;j++){q=L->data[i].kaoqin[j];if(q=='c')L->data[i].score+=0.5;elseif(q=='z')L->data[i].score+=1;}}/*,IKᦪ*/voidoutput(SeqList*L)(inti,j;printff'nonamekaoqinscore

257");for(i=l;i<=L->len;i++){j=L->data[i].k;j++L->data[i].kaoqin(j]=Vr/*ᙠᨬo=ὃpoqᐭ0,ᡠᨵὃrᢥstuᜐᳮ*/printf("%-12s%-12s%-21s%5.1f

258",L->data[i].no,L->data[i].name,L->data[i].kaoqin,L->data[i].score);}15./*ᨵ=xy$%&zᳮ2xy%&ᒹ|!xy1ஹ/0ஹy}ᑏ᦮_2᝞!প'ᐭKᦪinput:<ᐭxy%&஺3ᑖফᦋKᦪmodify:Txy1,xy2ᑮᦋᐸ%&2ᑮ2I┯Y஺4ᑖবᐭKᦪinsert!ᎷT⊤`xy%&ᢥxy1ᓣ_᣸ᑡ2T=xy%&2Eᐭo?ᯠᨵ_஺6ᑖ

259(4),IKᦪoutput:,IᡠᨵḄ%&஺(2ᑖ)JKᦪLᓫNOPᵨ2RSTU2ᑖ2JKᦪ3ᑖ஺*/includeincludeinclude#defineMAXLEN100typedefstruct{charno[8],name[10];floatsal;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;}SeqList;/*<ᐭᡠᨵxyḄ%&*/voidinput(SeqList*L){inti;printf("inputthelength

260");scanf(”d”,&L->len);printf("inputno,name,sal\rT);for(i=l;i<=L>>len;i++)scanf("%s%s%f"L->data[i].noL->data[i].name&L->data[i].sal);,//)/**/intsearch(SeqList*L,DataTypex){inti=l;while(i<=L->len&&strcmp(L->data[i].nox.no)>=0)/*ᐗjxᡠᙠ4z*/i++if(i>L->len)return0;returni;}/*ᦋ*/voidmodify(SeqList*L,DataTypex)(inti;i=search(L,x);if(i==0)printf("notexist

261");else{printf("inputname,sal

262")scanf("%s%f",L->data[i].name,&L->data[i].sal);)}

263/*ᐭ*/voidins(SeqList*LDataTypex)z(intij;i=search(L,x);if(i==0)(i=l;/*ᐭ4*/while(i<=L->len&&strcmp(x.no,L->data[i].no)>0)i++for(j=L->len;j>=i;j-)L->data[j+l]=L->data[j];L->data[i]=x;L->len++;)elseprintf("theelementalreadyexist

264");)/*Lᓫ*/voidmenu()(printf("l-------------'ᐭ%&

265");printf("2-------------ᦋ

266“)printf("3-------------ᐭ

267“)printf("4-------------,I

268“)printf("O-------------⌨I

269“))voidmain()(SeqList*L;DataTypex;intselj;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

270")scanf(”%d”,&sel);switch(sel)(casel:input(L);break;case2:printf("inputno

271");scanf(”s”,x.no);

272modify(L,x);break;case3:printf("inputno,name,sal

273");scanf("%s%s%f",x.no,x.name,&x.sal);ins(L,x);break;case4:for(i=l;i<=L->len;i++)printf("%10s%12s%7.1f

274",L->data[i].noL->data[i].name,L->data[i].sal);z)}while(sel!=O);)16./*ᨵ="#ᡂzᳮ2"#%&ᒹ|!"1ஹ/0ஹᡂᑏ᦮_2᝞!প'ᐭKᦪinput:<ᐭ"#%&஺(3ᑖ)(2)ᦋKᦪmodify:T"1,"#2ᑮᦋᐸᡂ2ᑮ2I┯Y஺(4ᑖ)ব᣸_Kᦪsort3"#%&ᢥᡂᵫᑮ¡᣸_஺(6ᑖ)(4),IKᦪoutput:,IᡠᨵḄ%&஺(2ᑖ)JKᦪLᓫNOPᵨ2RSTU2ᑖ2JKᦪ3ᑖ*/includeincludeinclude#defineMAXLEN100typedefstruct{charno[8],name[10];floatscore;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*<ᐭᡠᨵ"#Ḅ%&*/voidinput(SeqList*L){inti;printf("inputthelength

275");scanf(”%d”,&L>len);printf("inputno,name,score

276");for(i=l;i<=L->len;i++)scanf("%s%s%f"L->data[i].no,L->data[i].name,&L->data[i].score);/

277/**/intsearch(SeqList*L,DataTypex){inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*ᐗjxᡠᙠ4*/i++;if(i>L->len)return0;returni;}/*ᦋ*/voidmodify(SeqList*L,DataTypex)(inti;i=search(Lx);zif(i==0)printf("notexist

278");else{printf("inputnewscore

279");scanf("%f",&L->data[i].score);)}/*Lᓫ*/voidmenu()(printf("l------------'ᐭ%&

280");printf("2------------ᦋ

281");printf("3------------᣸_

282");printf("4------------,I

283");printf("O------------⌨I

284");)/*᣸_*/voidsort(SeqList*L){inti,j;for(i=2;i<=L->len;i++){L->data[O]=L->data[i];j=i-lwhile(L->data[0].scoredata[j].score){L->data[j+l]=L->data[j]j-}L->data[j+l]=L->data[O];)

285/*,IKᦪ*/voidoutput(SeqList*L)(inti=l;for(i=l;i<=L->len;i++)printf(,,%12s;%10s;%5.1f

286",L->data[i].no,L->data[i].name,L->data[i].sco}voidmain()(SeqList*L;DataTypex;intsei;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

287");scanf("%d"&sel);zswitch(sel)(casel:input(L);break;case2:printf("inputno

288");scanf("%s",x.no);modify(L,x);break;case3:sort(L);break;case4:output(L);break;}}while(sel!=O);17./*¢£z¢£ᒹ|!£1noஹ£0nameஹ¤¥newnumஹ¦§¤¥sumnum¨⚗%&2ᑏ᦮_ª«^_⊤!1)*ᓄ!'ᐭᨵḄᡠᨵ¢£Ḅ¨⚗%&஺3ᑖ2¬§!T£xḄ£1ᦪ¥2ᑮ£23£Ḅ¤¥§¤¥®¯xḄᦪ¥2®oḄ§¤¥]0,ᑣᑤ◀£%&ᑮ£2ᑣI┯Y஺9ᑖ

289বfY!fY¢£zᡠᨵ³£%&஺(2ᑖ)ভJ_LᓫḄµOPᵨ஺(4ᑖ)ᐗjRS^_⊤RSTU(2ᑖ)*/#includeinclude#include#defineMAXLEN100typedefstruct{charno[8],name[10];intnewnum,sumnum;floatprice;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;}SeqList;/*<ᐭᡠᨵ¢£Ḅ%&*/voidinput(SeqList*L){inti;printf(ninputthelength

290");scanf("%d",&L->len);printf(Hinputno,name,newnum,sumnum,price'n")for(i=l;i<=L->len;i++)scanf("%s%s%d%d%f',L->data[i].noL->data[i].name&L->data[i].newnum,&L->da///ta[i].sumnum,&L->data[i].price);)/**/intsearch(SeqList*L,DataTypex){inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*ᐗjxᡠᙠ4*/i++if(i>L->len)return0;returni;)/*¬§*/voiddel(SeqList*L,DataTypex)(intij;i=search(L,x);if(i==0)/*ᑮ*/printf("thenoiderror

291");else

292if(x.sumnum<=L->data[i].newnum){L->data[i].newnum-=x.sumnum;L->data[i].sumnum-=x.sumnum;if(L->data[i].sumnum==O)/*¬§o§¤]0,ᑣᑤ◀ᦋ£Ḅ%&*/(for(j=i+l;j<=L->len;j++)L->data[j-l]=L->data[j];(L>>len)-;))elseprintf("theamountiserror

293");)}/*fY*/voidoutput(SeqList*L){inti;printf("no,name,newnum,sumnum,price

294”)for(i=l;i<=L->len;i++)printf("%10s%12s%5d%5d%7.2f

295H,L->data[i].no,L->data[i].name,L->data[i].newnumL->data[i].sumnumL->data[i].price);//)/*Lᓫ*/voidmenu(){printf("l-------------'ᐭ%&

296“)printf(n2-------------¬§

297“)printf("3-------------fY

298“)printf("O-------------⌨I

299");)voidmain()(SeqList*L;DataTypex;intsei;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();

300printf("inputyourselect

301");scanf("%d”,&sel);switch(sel)casel:input(L);break;case2:printf("inputno,amount

302");scanf("%s%d",x.no,&x.sumnum);del(Lx);zbreak;case3:output(L);break;)}while(sel!=O);)18./*¢£z¢£ᒹ|!£1noஹ£0nameஹ¤¥newnumஹ¦§¤¥sumnum¨⚗%&2ᑏ᦮_ª«^_⊤!1)*ᓄ!'ᐭᨵḄᡠᨵ¢£Ḅ¨⚗%&஺3ᑖ2¶·!T£02,Iᡠᨵ¸T£0¹ºḄ£Ḅ%&஺3ᑖ3»¼½A!¾@§`ᡠᨵ£Ḅ»¿஺»¿]ᡠᨵ£Ḅᓫ»À§¤¥ḄÁÂÃ஺6ᑖ4fY!fY¢£zᡠᨵ³£%&஺2ᑖ5J_LᓫḄµOPᵨ஺4ᑖ6ᡂᐗjRSTU^_⊤RSTU2ᑖ஺*/#include#includeinclude#defineMAXLEN100typedefstruct{charno[8],name[21];intnewnum,sumnum;floatprice;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;}SeqList;/*<ᐭᡠᨵ¢£Ḅ%&*/voidinputSeqList*L{inti;printf"inputthelength

303";

304scanf("%d",&L->len);printf("inputno^ame^ewnum,sumnum,price

305");for(i=l;i<=L->len;i++)scanf(,,%s%s%d%d%f",L->data[i].noL->data[i].name&L->data[i].newnum,&L->daz/ta[i].sumnum,&L->data[i].price);}/*¶·*/voidsearch(SeqList*L,DataTypex){inti;printf("nonamenewnumsumnumprice

306n);for(i=l;i<=L->len;i++)if(strcmp(L->data[i].name,x.name)==O)printf(",%8s%20s%5d%5d%5.1f

307"L->data[i].noL->data[i].name&L->data[i]./zznewnum,&L->data[i].sumnum,&L->data[i].price);)/*»¼½A*/floatvolue(SeqList*L){floatv=0;inti;for(i=l;i<=L->len;i++)v+=L->data[i].price*L->data[i].sumnum;returnv;}/*fY*/voidoutput(SeqList*L){inti;printf("no,name,newnumsumnumprice

308,');/zfor(i=l;i<=L->len;i++)printf(',%10s%12s%5d%5d%7.2f

309",L->data[i].no,L->data[i].name,L->data[i].newnum,L->data[i].sumnumL->data[i].price);//*Lᓫ*/voidmenu()(printf(nl-------------'ᐭ%&

310");printf("2-------------¶·

311“)printf("3-------------½»

312“);printf("4-------------,I

313“)printf("O-------------⌨I

314“)

315voidmain()SeqList*L;DataTypex;intsei;floatv;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

316");scanf(”%d”,&sel);switch(sel)(casel:input(L);break;case2:printf("inputname

317");scanf("%s”,x.name);search(L,x);break;case3:v=volue(L);printf("thesumvulueis%10.2f

318Hv);/break;case4:output(L);break;}}while(sel!=O);)19./*¢£z¢£ᒹ|!£1noஹ£0nameஹ¤¥newnumஹ¦§¤¥sumnum¨⚗%&2ᑏ᦮_ª«^_⊤!1)*ᓄ!'ᐭᨵḄᡠᨵ¢£Ḅ¨⚗%&஺3ᑖ2!T£12ᙠ⊤`£2¤ᙠÄÅᐸ42ᔲᑣÄÅ0஺4ᑖ3Ç£!T¢£Ḅ£0ஹ£1ஹᦪ¥2ÈÉÇḄ¢£✂ᨵḄ¢£,ᑣᦋᐸ¤¥Ã¦§¤¥ÈÉÇḄ¢£Ë£2ᢥ£1ᨵ_ᐭᑮ⊤`஺ᎷT⊤`ᐗjᢥ£1ᓣ_᣸ᑡ7ᑖ4J_LᓫḄµOPᵨ஺4ᑖ5ᡂᐗjRSTU^_⊤RSTU2ᑖ*/#include#include#include#defineMAXLEN100typedefstruct

319{charno[8],name[21];intnewnum,sumnum;floatprice;}DataType;typedefstruct{DataTypedata[MAXLEN+l];intlen;JSeqList;/*<ᐭᡠᨵ¢£Ḅ%&*/voidinput(SeqList*L){inti;printf("inputthelength

320");scanf(”cT,&L->len);printf("inputno,name,newnum,sumnum,price

321")for(i=l;i<=L->len;i++)scanf(H%s%s%d%d%f",L->data[i].noL->data[i].name,&L->data[i].newnum,&L->da/ta[i].sumnum,&L->data[i].price);)/**/intsearch(SeqList*L,DataTypex){inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)i++if(i>L->len)return0;returni;)/*Ç£*/voidins(SeqList*LDataTypex)/{intij;i=search(L,x);if(i==0)/*ᑮ*/(i=l/*ᐭ4*/while(i<=L->len&&strcmp(x.noL->data[i].no)>0)zi++;for(j=L->len;j>=i;j-)L->data[j+l]=L->data[j];L->data[i]=x;L->len++}else/*ᑮ*/

322L->data[i].newnum+=x.sumnum;L->data[i].sumnum+=x.sumnum;))/*fY*/voidoutput(SeqList*L){inti;printf("no,name,newnum,sumnum,price

323")for(i=l;i<=L->len;i++)printf("%10s%12s%5d%5d%7.2f

324",L->data[i].no,L->data[i].nameL->data[i].znewnum,L>data[i].sumnum,L->data[i].price);/*Lᓫ*/voidmenu()(printfC'l------------'ᐭ%&

325“)printf("2------------

326“)printf("3-------------Ç£

327“)printf("4------------fY

328")printff'O------------⌨I

329“);)voidmain()(SeqList*L;DataTypex;intselj;L=(SeqList*)malloc(sizeof(SeqList));L->len=0;do{menu();printf("inputyourselect

330");scanf("%d",&sel);switch(sel)(casel:input(L);break;case2:printf(uinputno

331");scanf(”s”,x.no);i=search(L,x);if(i==0)printf("thisnoerror

332");else

333printf("%20s%5d%5d%7.2f

334"L->data[i].nameL->data[i].newnumL->data[i].///sumnum,L->data[i].price);break;case3:printf("inputnonamenewnum,sumnum,price

335");zzscanf("%s%s%d%d%f"x.nox.name,&x.newnum,&x,sumnum,&x.price);//ins(L,x);break;case4:output(L);break;)}while(sel!=O);)20./*"#"Ìzᳮ஺"#%&ᒹÍ!/0ஹ"1ஹ"ÌஹÎ"ÌஹÏÌ஺ᑏ᦮_ª«^_⊤!(1))*ᓄ!'ᐭᡠᨵḄ/0ஹ"1ஹ"Ì஺(3ᑖ)(2)ÎÌ!,ᐭ"1Î"Ì2ÏÌ="Ì-Î"Ì஺(5ᑖ)(3)ÑÎ"Ì!ÒÏÌ]GᦪḄ2,Iᐸ/0ஹ"1ஹÏÌÓ¾@ᡠᨵḄÏ̦ᦪ2¦ḄÏÌᦪÔKᦪ¼ḄNOÄÅ(6ᑖ)(4)J_LᓫḄµOPᵨ஺(4ᑖ)(5)ᡂᐗjRSTU^_⊤RSTU(2ᑖ)஺*/include#includeinclude#defineMAXLEN100typedefstructstudent/*TUᐗjᦪÕRS2DataType*/(charno[10],name[10];floatxtyjxtqf;/*xf—"Ìyjxf-Î"Ìqf-ÏÌ*/JDataType;typedefstruct/*TU^_⊤RSSeqList*/{DataTypedata[MAXLEN];intlen;JSeqList;voidmenu();voidinput(SeqList*L);intsearch(SeqList*L,DataTypex);voidjf(SeqList*L,DataTypex);floatcjxf(SeqList*L);voidoutput(SeqList*L);voidmain()

336{SeqList*SeqLStu;/*JKᦪ`2"#%&^_⊤ᵨSeqLStu⊤Y*/DataTypex;intsei;floatzqf;SeqLStu=(SeqList*)malloc(sizeof(SeqList));if(SeqLStu==NULL)exit(O);SeqLStu->len=O;/*3⊤)*ᓄ]=c⊤*/do{menu();printf("

337inputyourchoice:");/*,ᐭᡠ⌱eḄ1*/scanf("%d",&sel);switch(sei)(case1:input(SeqLStu);break;case2:printf("inputno,yjxf

338");scanf("%s%f"x.no,&x.yjxf);/jf(SeqLStu,x);break;case3:zqf=cjxf(SeqLStu);printf(“¦ÏÌ!%8.1f",zqf);break;case4:output(SeqLStu);break;case0:exit(0);}Jwhile(sel!=0);)/*LᓫKᦪ*/voidmenu(){printf("

339l............'ᐭ"#%&

340");printf("2..............ÎÌ

341“)printf("3..............ÑÎ"Ì

342“)printf("4..............fY

343“)printf("O..............⌨I

344“)/*,ᐭ"1ஹ/0ஹ"Ì*/voidinput(SeqList*L){inti;printf("

345initalizing............

346");printf("

347inputthelist'slengthscanf("%d",&L->len);getchar();for(i=l;i<=L->len;i++)

348{printf(Henterno,name,xf

349");scanf(,,%s%s%f"L->data[i].no,L->data[i].name&L->data[i].xf);//L->data[i].yjxf=O;L->data[i].qf=L->data[i].xf;))/**/intsearch(SeqList*L,DataTypex)(inti=l;while(i<=L->len&&strcmp(L->data[i].no,x.no)!=0)/*ᐗjxᡠᙠ4*/i++if(i>L->len)return0;returni;)/*ÎÌ*/voidjf(SeqList*L,DataTypex)(inti;i=search(L,x);if(i==0)printf("thenoiserror

350");else{L->data[i].yjxf=x.yjxf;L->data[i].qf=L->data[i].xf-L->data[i].yjxf;)}/*ÑÎ"Ì*/floatcjxf(SeqList*L)(inti;floatamount=0;printf(“"1/0ÏÌ

351“)for(i=l;i<=L->len;i++)if(L->data[i].qf>0){printf("%12s%10s%8.1f

352",L->data[i].noL->data[i].nameL->data[i].qf);//amount+=L->data[i].qf;}returnamount;}/*,IKᦪ*/voidoutput(SeqList*L)(inti=l;printf(""1/0"ÌÎ"ÌÏÌ

353“);for(i=l;i<=L->len;i++)printf("%-12s%-10s%-8.1f%-8.1f%-8.1f

354"L->data[i].no,L->data[i].name/,L->data[i].xf,L->data[i].yjxfL->data[i].qf);z

355)×ØÙ⊤=.qc⚪1.ᓫÙ⊤`ÜÂᜮÞßḄÔḄ]à஺2.ᵨᓫÙ⊤µO¤áâឋ⊤2Þß◤⌕æç2=ᦪÕç2è=.3.ᙠ=ᓫÙ⊤ḄpᡠᢣḄÞßpoᐭ=sᡠᢣḄÞß2ê᡻ìḄíî:___û4.ñᜮÞßḄᓫÙ⊤Ḅᜮᢣ┐]head,ᑨTÙ⊤]cḄᩩõ஺5.ᙠñᨵᜮÞßḄᓫÙ⊤HL`2⌕ᙠ✌ᐗjp÷ᐭ=ᵫᢣ┐pᢣᔣḄÞß2ᑣê᡻ìp->next=HL->nextíî஺6.ùᢣ┐ú¥pᢣᔣᓫÙ⊤`ÞßA,ᑣᑤ◀ÞßAḄoûÞß◤⌕Ḅíî]_ὃ⇋¤ácýḄþÿ஺7.᪀Ḅឋ⊤ᐸᐗḄᐵḄᩭ⊤Ḅ஺8.ᓫ⊤Lᢣ┐Pᡠᢣ$%Ḅᩩ'஺9.()ᐹᨵn,Ḅᓫ⊤-./,Ḅ01ᩖ3஺10.ᙠᓫ⊤L5ᢣ┐PᡠᢣḄᨵ67Ḅᩩ'011.᪀Ḅឋ⊤ᡠᨵᐗḄᙢᙬ:;஺12.᪀Ḅឋ⊤5<ᐭᡈᑤ◀A,ᐗᡠ◤Ḅ0CᐸDEᐵFGᨵᡈH13.ᙠᓫ⊤L5ᢣ┐PᡠᢣḄ$%Ḅᩩ'஺14.ᜮ

356d/c)஺18.ឋ⊤fghḄi,ᐗᐸ]DE____________gh஺k,mn⚪1.pᑡrJsᡂᵨᜮnext=head->next/*\Ḅᢣ┐ᢣᔣᜮḄp/,ᐗ*/;/*ᜮᢣᔣ\*/};/*yzᜮᢣ┐*/2.pᑡrJsᡂᵨ%PJ$ᦪvaḄn,ᐗKL/,wᜮḄᓫ⊤5xyzᐸᜮᢣ┐5{ᙠaḄpᑜfGᑏᔠ〉ḄᑁsᡂrJ஺NodeType*creatll(DataTypea[],intn){NodeType*head,*tailz*s;/*head$ᜮᢣ┐5tail$%ᢣ┐*/inti;head=initl();/*⊤ᓄ*/if(head==NULL)returnNULL;/*%ᢣ┐ᓄ$ᜮᢣ┐*/for(i=0;inext=NULL;/*\Ḅᢣ┐*/tail->next=s;/*S\Pᑮ⊤%*//*\$Ḅ⊤%*/}returnhead;/*yzᜮᢣ┐*/)3.᪀᪀Ḅᔜ4.ᓫ⊤ᜮᢣ┐ஹᜮ/,(¡)¢ὅḄ¤¥

3575.¦§᦮©wᜮḄᓫ⊤H,pᑡrJª«S⊤Ḅᐗ᎔E5Q¬⊤Ḅᐗ$1,2,3,4,5᎔E6ᙠᑣᡂ5,4,3,2,1.{ᙠaḄpᑜfGᑏᔠ〉ḄᑁsᡂrJ஺voidreverse(){NodeType*p;p=H->next;/*pᢣᔣ✌ᐗ*/H->next=NULL;/*ᜮḄᢣ┐$a*/while()/*pd$a0*/{q=p;p=p->next;/*pᢣ┐6¯*//*SqᡠᢣᔣḄ<ᐭᑮᜮ6*/))¢.rJ°±⚪1.°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnode(intdatastructnode*nextJNodeType°±/rJᑭᵨᓫ⊤¬ᩭḄSᓫ⊤ᐗ᎔E஺ᓽµ¬ᩭḄᐗ᝞¸$µ1,2,3,4,5᎔E6ᡂ5,4,3,2,1»2.°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnode{intdatastructnode*nextJNodeType°±/rJ¹ºᑭᵨ¬⊤Ḅ5S⊤ᑜᑖᡂi,⊤5/,⊤]E¼ᦪ½5¾᜜/,⊤]EÀᦪ஺3,°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnodeintdatastructnode*next

358}NodeType°±-rJᑤ◀ᓫ⊤[1Ḅ஺4.°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnode(intdatastructnode*next}NodeType°±/rJᑤ◀ᓫ⊤ᡠᨵḄᐗX஺5,°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnode(intdatastructnode*next}NodeType°±/rJ¹ºᵨ¬⊤ḄSi,ᓣO᣸ᑡḄᓫ⊤ᔠx$/,ᓣO᣸ᑡḄᓫ⊤O6.°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnode(intdatastructnode*nextJNodeType°±rJ¹ºᵨ¬⊤ḄSi,ᓣO᣸ᑡḄᓫ⊤ᔠx$/,ÄO᣸ᑡḄᓫ⊤O7.°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnode(intdatastructnode*nextJNodeType°±/rJᙠwᜮḄᓫ⊤L5S\ᐗx<ᐭᑮwᜮḄᓫ⊤LḄᐗelm65Qdᙠᐗelm,ᑣ<ᐭᑮᨬ6஺8.°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnodeintdata

359structnode*nextJNodeType°±/rJᙠwᜮḄᓫ⊤L5S\ᐗx<ᐭᑮwᜮḄᓫ⊤LḄᐗelm5Qdᙠᐗelm,ᑣ<ᐭᑮᨬ6஺9.°ᓫ⊤Ḅ²©c³᝞pµtypedefstructnode(intdatastructnode*nextJNodeType°±/rJµS-.cḄ/,ᐗx<ᐭᑮᓣO᣸ᑡḄᓫ⊤5ÆÇ⊤ḄᦪÈᯠᨵO஺10.¦§/wᜮḄᓫ⊤L,²©$µtypedefstructnode(intdata;structnode*next;Jnodetype;°±/rJ5Ê⊤ᨬᜧḄxyzḄᢣ┐5Q⊤$a5ᑣyz/,aᢣ┐஺Ìnµ1.°±/rJᑭᵨᓫ⊤¬ᩭḄSᓫ⊤ᐗ᎔E஺ᓽµ¬ᩭḄᐗ᝞¸$µ1,2,3,4,5᎔E6ᡂ5,4,3,2,1஺voidreverse(NodeType*H){NodeType*p;p=H->next;H->next=NULL;while(p){q=p;p=p->next;q->next=H->next;H->next=q;})2.°±/rJ¹ºᑭᵨ¬⊤Ḅ5S⊤ᑜᑖᡂi,⊤5/,⊤]E¼ᦪ½5¾᜜/,⊤]EÀᦪ஺/*Íᑖᓫ⊤Îᦪ஺¼ᦪ½Ï]ᙠhead5Àᦪ]ᐭheadl5Îᦪyzheadl*/NodeType*chaifenfNodeType*head)(NodeType*p,*q,*r,*headl;headl=(NodeType*)malloc(sizeof(NodeType));஻$\⊤KLᜮheadl->next=NULL;

360r=headl;p=head;while(p->next)//Ѭ⊤/,¡if(p->next->data<0){q=p->next;஻qᢣᔣÀᦪp->next=q->next;஻ÀᦪѬ⊤ÒÓr->next=q;//ÀᦪV%PJ<ᐭᑮ\⊤r=q}elsep=p->next;r->next=NULL;஻\⊤%Ḅᢣ┐$areturnheadl;}3.°±/rJᑤ◀ᓫ⊤[1Ḅ஺voidpur_LinkList(NodeType*H){NodeType*p,*q,*r;p=H->next;if(p==NULL)returnwhile(p->next){q=p஻ÕCp[1Ḅxᑤ◀while(q->next)if(q->next->data==p->data){r=q->next;q->next=r->next;free(r);}elseq=q->next;p=p->next;))4.°±rJᑤ◀ᓫ⊤ᡠᨵḄᐗX஺voidpur_LinkList(NodeType*H){NodeType*p/q,*r;q=H;while(q->next!=NULL){஻ÕXxᑤ◀if(q->next->data==x){p=q->next;q->next=p->next;free(p);}elseq=q->next;))5.°±/rJ¹ºᵨ¬⊤ḄSi,ᓣO᣸ᑡḄᓫ⊤ᔠx$/,ᓣO᣸ᑡḄᓫ⊤LinkListmerge(NodeType*A,NodeType*B){NodeType*p,*q,*tail;

361p=A->next;q=B->next;஻Ñi,⊤/,¡C=A;C->next=NULL;tail=C;free(B);while(p&&q)஻i,⊤×ᨵ0{if(p->datadata)஻ÒÓi,⊤ØḄᐗ{s=p;p=p->next;}else{s=q;q=q->next;}tail->next=s;//ᵨ%PJ<ᐭᑮ\⊤tail=s;if(p==NULL)p=q;஻SᒕÚᐗ]ᐭ\⊤tail->next=p;)6.°±/rJ¹ºᵨ¬⊤ḄSi,ᓣO᣸ᑡḄᓫ⊤ᔠx$/,ÄO᣸ᑡḄᓫ⊤LinkListmerge(NodeType*A,NodeType*B){NodeType*C,*p,*q;p=A->next;q=B->next;஻Ñi,⊤/,¡C=A;C->next=NULL;free(B);while(p&&q)஻i,⊤×ᨵ0{if(p->datadata)஻ÒÓi,⊤ØḄᐗ{s=p;p=p->next;}else{s=q;q=q->next;}s->next=C->next;//ᵨᜮnext=s;}if(p==NULL)p=q;஻SᒕÚᐗ]ᐭ\⊤while(p){s=p;p=p->next;s->next=C->next;C->next=s;})7.°±/rJᙠwᜮḄᓫ⊤L5S\ᐗx<ᐭᑮwᜮḄᓫ⊤LḄᐗelm

36265Qdᙠᐗelm,ᑣ<ᐭᑮᨬ6஺voidlink_ins(NodeType*head,datatypex,datatypeelm)(NodeType*p,*s;p=head;while(p->next!=NULL&&p->next->data!=elm)p=p->next;s=(NodeType*)malloc(sizeof(NodeType));s->data=x;s->next=NULL;if(p->next==NULL)஻ÛÕᑮ05pᢣᔣᨬ6/,p->next=s;else஻Õᑮ05p->nextᢣᔣelmᐗ{s->next=p->next->next;p->next->next=s;)8.°±/rJᙠwᜮḄᓫ⊤L5S\ᐗx<ᐭᑮwᜮḄᓫ⊤LḄᐗelm5Qdᙠᐗelm,ᑣ<ᐭᑮᨬ6஺voidlinkJns(NodeType*head,datatypex,datatypeelm)(NodeType*p,*s;p=head;while(p->next!=NULL&&p->next->data!=elm)p=p->next;s=(NodeType*)malloc(sizeof(NodeType));s->data=x;s->next=NULL;if(p->next==NULL)஻ÛÕᑮ05pᢣᔣᨬ6/,p->next=s;else஻Õᑮ05p->nextᢣᔣelmᐗ.pᢣᔣelmḄ{s->next=p->next;p->next=s;))

3639.°±/rJµS-.cḄ/,ᐗx<ᐭᑮᓣO᣸ᑡḄᓫ⊤5ÆÇ⊤ḄᦪÈᯠᨵO஺voidins(NodeType*Lintx)z{NodeType*p=L,*s,*q;஻Õ/,_xᜧḄᐗḄÜwhile(p->next!=NULL&&p->next->datanext;஻Qx_ᡠᨵᐗ×ᜧ5pᢣᔣᨬ6/,ᔲᑣᢣᔣ/,_xᜧḄᐗḄÜ5iÞßàp5×SX<ᐭᑮP6sk(NodeType*)malloc(sizeof(NodeType));஻$\ᵭ{as->data=x;s->next=p->next;஻\<ᑮp6p->next=s;10.°±/rJ5Ê⊤ᨬᜧḄxyzḄᢣ┐5Q⊤$a5ᑣyz/,aᢣ┐஺NodeType*maxpNodeType*L){NodeType*p=L->next,*s;if(p!=NULL){s=p;஻/,ᓄ$ᨬᜧḄp=p->next;஻Ñk,¡_áwhile(p!=NULL){if(p->data>s->data)s=p;஻sᢣᔣᨬᜧḄp=p->next;)returns)elsereturnNULL)âã᪘åᑡ/.Ga⚪1.$æÌçèNO᪀åᑡḄ“ᎷëÓ”«í5⁚ïᑁᓫᐗ5ᙠåᑡðñòᐭᦪóḄôr5UVSᐸ᪀⌼ᡂåᑡ஺

3642.Ìç±röCᡭᓺöù3dᓛû)⚪5ü°E/,ᦪýþ¤5ÿ᪀஺3.ᑡ⚪⊤ᡂ✌Ḅ⊤஺4.ᙠᑡ᝞"ᐸᜮᢣ┐front,ᑡᐗ(ᦪlen,ᑣ+ᑡ,Ḅᩩ.O5.ᑡḄ/ᐭ12ᙠ______45஺6.ᑡḄᑤ◀12ᙠ45஺7.᪘Ḅ:ᐭᑡ;1,2,3ᑣ<=>Ḅ᪘:?ᑡo8.ᑡ▲ᑴ/ᐭB>ᙠ⊤ḄCᑤ◀ᙠ⊤ḄDC45ḄEឋ⊤ᐸᱯH9.ᑡḄᱯH஺10.I2ᐜ4ᐜ?⊤஺11.᪘KᑡLMEឋ⊤஺12.ᙠ24᪘NOP⌕ᑨS᪘ᔲ஺13.ᙠ2⌨᪘NOP⌕ᐜᑨS᪘ᔲ஺14.ᙠᑡ>VWᑖYK,ZZ[ᵨᐗ(,]஺ᙠ^M_`aYḄᩩ.oᎷcᑡḄᨬᜧfgMAXSIZE,✌front,rear஺15.᪘ḄᱯH.h.ij⚪1.ᑡḄkHlmn᝞oᑨSᑡḄ",'ᡈ"Y"n2.᪘ḄᱯHlmnᑡḄᱯHlmn3.lm⌴tn⌴tᨵlmkHn4.lm᪘⚔nlm᪘wn5.?᪘Kx᪘⚔ᐗ(ᨵyWSnzᨵᐸWSlmn6.{᪘Kᓫ{⊤ᨵlm}HK<}Hn7.{ᑡKᓫ{⊤ᨵlm}HK<}Hn8.lm⊤nlm᪘nLὅ]ᨵlmὶKWSn9.᪘SKᑡQḄ᝱ᙳ,ᐗ(el,e2,e3,e4,e5,e6᪘S,ᐗ(?᪘ᓽ4ᐭᑡQ,z6ᐗ(?ᑡe2,e4,e3,e6,e5,el,ᑣ᪘SḄfg[[nᑏ?ᐸᑖ᪆஺ஹᦪK⊤.,⚪1.10▤Ḅa▣Aᢥᑡkᐜ¢£¤¥ᙠ¦ᦪCᑣCᦪḄᜧ§¨2.©ªh¦ᦪA[10]I20]«ᵨ5kᐜ¬¤¥®ᐗ(ᓰ2¤¥ᓫᐗ°±A[0][0]Ḅ¤¥ᙢᙬ1000,ᑣA[2]´Ḅ¤¥ᙢᙬ஺3,µ5X5Ḅa▣45¢£¤¥P᝞"®ᐗ(⌕ᓰ3¶⁚ᐳ◤Ḅ¤¥ᓫᐗᦪ஺4.ᦪB[0..3,1..5],ᦪḄºᐗ(B[i,j]ᙳᓰLᓫᐗ»✌ᙢᙬSA¼½ᦪBᢥ5¾45¤¿ᑣᐗ(B[3,4]Ḅᙢᙬo5.©ªᐹᨵnᐗ(Ḅ¦ᦪ«ᵨ¤¥᪀®ᐗ(ᓰk¤¥ᓫᐗᐗ

365(ḄᙢᙬLOC(al),ÁmLOC(ai)=,6.¶Â(iI)MᱯÅḄEឋ⊤ÆḄÇᵫ¶Âᡂ஺7.¶ÂKEឋ⊤᪵ÆÊ«ᵨḄ¤¥¬ËKo8.h¦ᦪḄ¤¥=Ì«ᵨÌ5¾¤¥Ë=«ᵨ¤¥஺9.Í}ᐗ(ᡈὅÎᐗ(ᑖÏᨵcÐÑḄ▣I஺10.µI▣YÒᩩ.Ḅ▣.11.ᨵÓÍ}ᐗ(ᡈÓÎᐗ(±Í}ᐗ(ᡈὅÎᐗ(ᑖÏÔᨵcÐÑḄ▣I஺12.ÕÖ▣Ḅ¢£¤¥◀⌕פØÎᐗ(ḄÍ᜜Ú⌕פØÎᐗ(ᙠ▣Ḅ13.▣¢£¤¥ᢣÍ}Ḅᐗ(ᑖÛ¤¥,]µ<ᑖÛ¤¥,]஺14.ÕÖ▣Ḅ¢£¤¥Ê«ᵨK¤¥஺15.n▤µI▣ᐗ(=ÌB¤¥aÜᑖᐳ◤ᓫᐗḄ,]஺h.ij⚪1.iÝaᑡÞß;,à,á¾KâÍKã஺2.ᢥÌ5¾Ḅ¤¥ᑡ?ä¦ᦪa[2][3n2]ভᡠᨵᐗ(ᙠᑁ¤Ḅ¤¥஺3.èc᦮êᦪb[3H5],©ª®ᐗ(ᓰ2¶⁚b[0][0]Ḅ¤¥ᙢᙬ1200,ëìᙠ5¾Ḅ¤¥¬a;(1)bফ[4]Ḅ¤¥ᙢᙬ஺(2)+ᦪᓰᵨḄ¶⁚ᦪ஺4.©ªᦪA[8][10],ᢥᑡ¤¥ᦪᐗ(PA[4]যḄïᙢᙬàᦪAᢥ5¤¥PḄðᐗ(Ḅïᙢᙬ}nÕÖ▣Ḅ¢£¤¥ᨵðLM¬ñn5,lmÕÖ▣Ḅᐗ⊤¤¥nëᑏ?Ìa▣AḄᐗ⊤஺0014020300000VWVW000400.-VSA*/WVSAAZWVSAz050.000+6.Aᐹᨵm5nᑡḄᐗ(Ḅh¦ᦪ®ᐗ(ᓰᵨs¤¥ᓫᐗLoc(aij)ᐗ(aijḄ¤¥ᙢᙬLoc(aOO)a00¤¥òóËh¦ᦪAḄôᙬ஺zÌ5¾Ḅ¬¤¥h¦ᦪᑣᐗ(aijḄ¤¥òólmnzÌᑡ¾Ḅ¬¤¥h¦ᦪᑣᐗ(aijḄ¤¥òóõlmn7.lm¶ÂnÆKEឋ⊤ᨵlmὶKWSn8.lm▣n᝞o▣¤¥ᑮ¦ᦪn÷hø᪛

366.,⚪1.ᐹᨵ256HḄúᐰhø᪛Ḅüý஺2.þüý6ḄYhø᪛ÿᦪ஺3.ᐰ᪛Ḅ8ᨵ8ᑣᐸᦪ஺4.᪷Ḅᦪ1,ᑣkḄ᪛ᨬᐹᨵ஺5.ᨵ3Ḅ᪛ᐳᨵ!"᝱஺6.᝞%⌕'ᵨ)*+,᪀+,᪛.᪛/0᪛஺7.kḄᐰ᪛1ᦪᨬ஺8.kḄᐰ᪛ᡠ3Ḅᦪᨬ09.nᩗ᪀ᡂ67Huffman᪛ᐸ1ᦪ஺10.ᐹᨵnḄ᪛ᵨ8⊤+:ᐳᨵ;ᢣ┐>஺11.ᙠ67᪛@AḄḄᦪN0,2ḄḄᦪN2,ᑣᨵN012.B8Ḅᐰ᪛CDᨵ஺13.᪛ᨵ50ᑣ.᪛Ḅ1ᦪCD஺14.ᙠ᪛@ᢣ┐pᡠᢣḄᩩF஺15.᪛ḄiGᨬ3ᨵᦪo.HI⚪1.KL6ᩗMNᔠW=(l,3,5,8,10,11),⌕P᪷QKLḄᩗMNᔠ᪀⌼67STU᪛VWXSTU᪛ḄYᩗZ[\WPL஺2.67᪛Ḅᐜ*^ᔊ`cedba,@*^ᔊ`debac,abc.᪛Vᑏce*^ᔊ%஺3.᪛ᦪM'ᵨ)*+,᪀᝞fgᡠh`a.bc.᪛஺b.ᑏci*^ᔊஹ@*^ᔊke*^ᔊḄ%஺12345678910111213141516171819201@_______________________________________________________________________________________________________________________________________________________________________________________________________a”f.g1h.IP3*4.67᪛Ḅ@*^ᔊ*ᑡBCAEDஹe*^ᔊ*ᑡCBEDA,bcn7᪛Vᑏcᐸᐜ*^ᔊḄ*ᑡ஺5.ᎷᵨpqrḄᵯᦻᵫ5vwSI,S2,S3,S4,S5xᡂᔜvwᙠᵯᦻ@czḄ⚣᳛ᑖ~0.25,0.22,0.20,0.18,0.15,abcᐸḄSTU᪛VKcᔜvwḄSTUṹ஺6.ᎷaஹbஹcஹdஹeஹfḄᵨ⚣ᑖ~0.07,0.09,0.12,0.22,0.23,0.27,ᑏcaஹbஹcஹdஹeஹfḄHuffman(STU)ṹ஺⌕PbcSTU᪛஺7.ᐰ᪛Ḅ)*+,᪀@+,ᦪQABCDE,⌕PKc.᪛Ḅ8+,᪀VKc.᪛Ḅi*ஹ@*^ᔊ*ᑡ஺8.᪛@*^ᔊḄ%DGBAECF,e*^ᔊḄ%GDBEFCA஺(1)bc᪛(2)ᑏcᐸ^ᔊḄ%஺

367.XW⚪1.Ꮇ᪛ḄL᝞f`typedefstructnode(intdata;structnode*lchild,*rchild;JBstree;W6XW᪛@2Ḅ1ᦪ஺2.Ꮇ᪛ḄL᝞f`typedefstructnode(intdata;structnode*lchild*rchild;/JBstree;W6Xᐗxᡠᙠᑮ.Ḅᢣ┐ᔲᑣ6;ᢣ┐஺3.Ꮇ᪛ḄL᝞f`typedefstructnode(intdata;structnode*lchild,*rchild;JBstree;W6XW1ᦪ஺4.Ꮇ᪛ḄL᝞f`typedefstructnode(intdata;structnode*lchild*rchild;/}Bstree;W6XP᪛Ḅ஺I`1.W6XW᪛@2Ḅ1ᦪ஺intcount(Bstree*bt){if(bt==NULL)return0;if(bt->lchild!=NULL&&bt->rchild!=NULL)return1;elsereturn(count(bt->lchild)+count(bt->rchild));)2.W6Xᐗxᡠᙠᑮ.Ḅᢣ┐ᔲᑣ6;ᢣ┐஺BiTreeSearch(Bstree*bt,datatypex)

368{Bstree*p=NULL;if(bt){if(bt->data==x)returnbt;if(bt->Lchild!=NULL){p=Search(bt->lchild,x);if(p)returnp;}if(bt->rchild!=NULL){p=Search(bt->rchildx);zif(p)returnp;})returnNULL;3.W6XW1ᦪ஺intcountleafl(Bstree*bt){if(bt==NULL)return0;if(bt->lchild==NULL&&bt->rchild==NULL)return1;elsereturn(countleafl(bt->lchild)+countleafl(bt->rchild));4.W6XP᪛Ḅ஺intDeepBiTree(Bstree*T)஻P᪛Ḅintldeep,rdeep;if(পreturn0;஻;᪛0Ideep=DeepBiTree(T->lchild);rdeep=DeepBiTree(T->rchild);if(ldeep>rdeep)஻ldeep¡“᪛”Ḅ¤᪛஺returnIdeep+1;஻rdeep¡“᪛”Ḅ¥᪛஺returnrdeep+1;}¦§᪛6.¨;⚪1.ᵨ©ᐘ«+,᪛¬᪛Ḅᐜ*^ᔊ%ᐸḄ᪛Ḅ^ᔊ%®¯஺2.ᵫ᪛°ᣚᡂḄ᪛ᐸ᪷Ḅ¥᪛1o3.᪛Ḅe*^ᔊ%ᐸḄ᪛Ḅ^ᔊ%®¯஺4.Aᨵ3ᐘ«²BAḄ³´ᑣBḄᦪ஺

3695.᪛ᵫn(n>=0)᪀ᡂḄᨵ▲Nᔠ஺¶n=0¬·஺6.᪛Ḅ᪛@ᡠᨵḄḄḄ஺7.¸᪍T@ᨵ7᪛67᪛Ḅᦪᑖ~nl,n2,n3,º¸᪍°ᣚᡂ᪛eᐸ᪷Ḅ¤᪛ᓃᨵ஺8.᪛Ḅ᪷¼i½ᐸ¾ᨵ²¿ᨵ6i½஺9.᪛"᪀Àឋ᪀ḄÂ~஺10.A7ᡈᨵ▲7Ä®ÅḄ᪛ḄNᔠ·஺11.ÆÇ᪷Q᪷ᨵ¼¥ᑖȺ67᪛°ᣚ᪛ᡈ஺12.᪛°ᣚᡂḄ᪛᪛Ḅ᪷஺13.᪛k¸᪍Ḅᐜ᪷^ᔊᡠ°ᣚᡂḄ᪛Ḅᐜ*^ᔊ%஺14.᪛k¸᪍Ḅe᪷^ᔊᡠ°ᣚᡂḄ᪛Ḅ@*^ᔊ%஺15.¸᪍°ᣚeḄ᪛᪛Ḅ᪷஺.HI⚪1.672Ḅ᪛67᪛ḄÂ~ÉÊË2.ᑏcf☢᪛Ḅᔜ!^ᔊ%Vºᐸ°ᣚḄ᪛஺3.ºfᑡ¸᪍°ᓄ᪛Vᑏc.¸᪍ÎÏḄᔜ!^ᔊ*ᑡ஺

3704.fᑡ᪛¸᪍•Ḅ᪛abcḄ¸᪍ᑏc¸᪍Ḅᐜ*ke*^ᔊ஺5.ᑏcfgᡠhḄ᪛Ḅᐜ*ke*^ᔊ*ᑡVºᐸ°ᣚᡂḄ᪛஺6.º᝞fgᡠhḄ¸᪍°ᣚᡂḄ᪛Vᑏc᪛Ḅᐜ*ஹ@*ke*^ᔊ*ᑡ஺7.᪛ÑᨵÒÓ+,ÔËaᑖ~ÕÖ஺8.᪛ÑᨵÒÓ⊤hÔËaᑖ~ÕÖ஺קgØẠ

3716.¨;⚪1.¼ᔣgḄÛÜÝ▣Ý▣஺2.gḄ+,᪀ᨵÛÜÝ▣kß!஺3.ᙠ6ᐹᨵn⚔Ḅᨵᔣg@ᨬÆÇᨵᩩá஺4.ᐹᨵN⚔Ḅ¼ᔣg@áCDᨵᩩ஺5.ᙠ6ᐹᨵn⚔Ḅᨵᔣg@ᨬÆÇᨵᩩá஺6.QᨵᔣgḄÛÜÝ▣⚔iḄᐭ஺7.ᨵ10⚔Ḅ¼ᔣgCDᨵᩩáãäåæᐸçqḄ஺8.g"᪀᪛"᪀ḄÂ~஺9.gᵫ⚔k᪀ᡂ஺10.gḄèᐜéê^ᔊ⌕ᵨëz஺11.gÆᑖᑖᨵᔣgஹ¼ᔣgஹᨵᔣìgkí!஺12.gḄîèᐜéê^ᔊïp᪛Ḅ஺13.ᡠðgḄÛÜÝ▣⊤hᵨ6ñᦪx+,g@⚔Ḅvòᵨ·óÛÜÝ▣ḄÝ▣⊤hg@஺14.gḄîèᐜéê^ᔊ⌕ᵨëz஺15.gḄèᐜéê^ᔊïp᪛Ḅ஺.HI⚪1.bcfgÛÜÝ▣+,᪀V᪷QÛÜÝ▣ᑏcô⚔Aõöᑖ~ÎÏèᐜéê^ᔊkîèᐜéê^ᔊḄ%஺2.bcfgḄÛÜ8⊤+,᪀Vᑏc᪷Q.ÛÜ8⊤ô⚔AõöÎÏèᐜéêkîèᐜéê^ᔊḄ%஺

3723.KcfgḄÛÜ8⊤V᪷QÛÜ8⊤ᑖ~ᑏcô⚔Ac÷^ᔊ.gḄèᐜéêkîèᐜéê*ᑡ஺4.gḄÛÜÝ▣+,᝞fgᡠh஺a᪷QÛÜÝ▣(1)bc.gফᑏcô⚔Ac÷èᐜ^ᔊ.gḄ*ᑡ஺ABCI)E01001001000001011000001005.gḄÛÜ8⊤᝞fgᡠh஺a᪷QÛÜ8⊤(1)ᑏcô⚔Ac÷èᐜ^ᔊ.gḄ*ᑡ(2)bc.g஺

3736.6gḄÛÜ8⊤᝞ùᡠhabc.gVᑏcᐸèᐜkîèᐜ^ᔊḄ*ᑡ7.6gḄÛÜÝ▣᝞fᡠh⚔ᵨV1,V2,V3,V4,V5,V6⊤habc.gVᑏcᐸèᐜkîèᐜ^ᔊḄ*ᑡ஺0111011011001101001110100001001000008.¼ᔣgG᝞fgᡠh⌕PKc.gḄÛÜÝ▣V᪷QÛÜÝ▣ᑏcᐸèᐜkîèᐜ^ᔊḄ*ᑡ஺

374ú§gᵨ6.¨;⚪1.ûüý(Prim)X〉ᔠpPḄᨬÿᡂ᪛஺2.ᩲᱯ(Dijkstra)ᢥᨬ஺3.᝞n⚔Ḅᡂᑣᨵ"ᡂ᪛஺4.#$%(Prim)ᵨᩭ)஺5.*+,Ḅ⚔ᦪ.n,ᑣ/Ḅᡂ᪛Ḅ0ᦪ.஺6.1+,G2ᨵn⚔eᩩ0ᑣᐸᨬ5ᡂ᪛6ᨵᩩ0஺7.78ᓱ:(Kruskal)〉ᔠ=)Ḅᨬ5ᡂ᪛஺8.ᒹ?ᔣGᡠᨵ⚔ḄḄ᩽5+,CD.GḄᡂ᪛஺9.Eᡠᨵn-1ᩩ0ḄᩗGHIᨬ5Ḅᡂ᪛J«10.PrimLMNᨵ⚔OkruskalLMᒹ஺11.PQRS(Floyd)ᵨᩭ)-12.UVᑮᐸᔜ⚔ḄᨬJ஺13.78ᓱ:(Kruskal)Yᢥ᯿᪀⌼ᨬ5ᡂ᪛Ḅ]஺14.ᡠᡂḄ^_ᨬ5ᡂ᪛2Ḅ⚔Prim+,Okruskal+,஺15.ᩲᱯ(Dijkstra)ᵨᩭ)஺`.bc⚪1.eᵨPrim]fghU⚔1LMḄᨬ5ᡂ᪛஺2.eᵨ#$%(Prim)]fghU⚔1LMḄᨬ5ᡂ᪛

375163.1?ᔣG᝞hᡠi,⌕)ᵨkruskalfg/Ḅ/Ḅᨬ5ᡂ᪛஺4.1?ᔣG᝞hᡠi⌕)ᵨkruskalfg/Ḅ/Ḅᨬ5ᡂ᪛஺

3765.h⊤iᙢnḄ,op0⊤iqrsḄ,ot06Ḅᩗ⊤iu1tvwḄxy᝞z⌱|}~,qrxyᨬḕḄn-1ᩩtfgᡠᨵ}Ḅ⌱|6.hᡠiḄᨵᔣp᡻ᩲᱯDijkstraᑮ⚔Aᑮᐸᔜ⚔Ḅᨬᨬeᙠ⊤1Ḅ1ஹ2ஹ3ஹ4ᜐ6〉^Ḅᑁ/Ḅ᡻⊤1U⚔Aᑮᐸᔜ⚔ḄᨬᨬḄᩲᱯ)

377ஹஹBCDEFGS1512K=13,B)(1)a,D)C15126K-2B)(A,D)(2){A,C,F}15111016K=3(A,B)C,F,D)(A£E)DUG){A,C,F,E}151116K=4B)C,F,D)(3)15K=5B)(4)C,r,I,D,G}15K=6(A,B)UX,EE,D,G,B)7.eᵨᩲᱯ(Dijkstra)ᑏghU⚔Aᑮᐸ⚔Ḅᨬ஺8.eᵨPQRS(Floyd)ᑏghU⚔Aᑮᐸ⚔Ḅᨬ

378ᓝ᣸.⚪1.¡Ḅ᣸]ᢣᙠ᣸2ᐵ¤¥G¦§Ḅ¨©ª«sḄ_¬¦®¯2.°:᣸ஹ±²᣸ஹᚮ᣸I`´µ᣸¶Y᣸2⌕)·¸sᨬ¹Ḅ஺3.ᑖ»¼ᵨᚮஹ±²ஹ½ᐭஹ´µ᣸¿MÀ᝱.⌴ÃᑡḄ⊤ᢥ⌴ÃÅ᣸ᨬwḄ஺4.ᙠÆǽᐭஹᑈÉஹ±²᣸Ibᓫ⌱|᣸]2ËᙳsÍᩖÏᨬÐḄ᣸]_________________5.±²᣸ḄËᙳsÍᩖÏ.6.ᐹᨵ12ª«Ḅᑡ¼ᵨᑈÉ᣸ᨬÓḄÔÕÖᦪ7.1ᨵ1000?ᐗØ°ÙᵨÕ±²Ïᢧ⌱gᐸ2_10ᨬᜧᐗØᙠ±²᣸ᚮ᣸Üᦪ᣸Æǽᐭ´µ᣸ÝÞ]2¼ᵨ]ᨬß஺8.᜜᣸ḄÜá]9.±²᣸Ḅᨬâãäᐸå᣸Ḅ¿M᣸ᑡ10.ᑖ»¼ᵨᚮஹ±²ஹ½ᐭஹ´µ᣸¿MÀ᝱.⌴ÃᑡḄ⊤ᢥ⌴ÃÅ᣸ᨬwḄ஺11.nᐗØᢥæᐵ¤¥ᵨᚮ᣸]ᵫ5ᑮᜧ᣸èéᵨ⚔ᚮ஺12.ᑁ᣸ᢣå᣸ᑡᡠêḄ᣸13.᜜᣸ᢣ᣸2◤ìíḄ᣸஺14.ᙠÆǽᐭஹᑈÉஹ±²᣸Ibᓫ⌱|᣸]2ᐹᨵ¡ឋḄ᣸]ᨵ15.ᙠᑈÉஹ±²ஹÆǽᐭïY᣸]2᣸Ḅðᦪñᦪò⊤Ḅ¿M᣸ᑡÅ?ᐵḄ᣸]16.^ᦪò⊤¿᝱ÜáᨵḄãähᙠᑈÉஹ±²Ibᓫ⌱|᣸]2è⌱|᣸]UOé᣸ḄðᦪᨬÓ

379`.bc⚪1.=óô¡Ḅᐵ¤¥{49,38,27,15,94,53},ᑏgᐵ¤¥õ.ÜöᐗØ÷ᵨ±²᣸]êᓣ᣸ÖᑜᑖḄú᝞⌕ûü᣸ᐳ◤êþÖᑜᑖÿ2.᣸ḄឋḄ᣸Ḅ᣸Ḅ஺3.Ḅᐵ{49,38,27,15,94,53,81},ᑏᑈ!᣸"#ᓣ᣸ᑡḄᔜ'()஺4.*+,-.ᐵᑡ/(19,21,16,5,18,23),⌕1219/34Ḅ'56᣸()2782'9:⌱<᣸=Ḅ()஺5.Ḅᐵᑡ{58,12,33,20,65,77},ᑖ?ᑏᵨᑈ!᣸56᣸"#ᓣ᣸ᑡḄᔜ'()6.ḄᦪBC3ஹ6ஹ1ஹ2ஹ4ஹ5,Eᑖ?ᑏ9:Fᐭ᣸56᣸Ḅᔜ'H#()7.Ḅᐵᑡ{58,12,33,20,65,77},ᑖ?ᑏᵨᑈ!᣸Iᓫ⌱<᣸"#ᓣ᣸ᑡḄᔜ'()஺8.Ḅᐵ{53,87,12,61,35,48},ᑏᑖ?ᵨ9:FᐭIᓫ⌱<"#ᓣ᣸ᑡḄᔜ'()9.Ḅᐵ{53,87,12,61,35,48},ᑏᑖ?ᵨᑈ!᣸9:Fᐭ᣸"#ᓣ᣸ᑡḄᔜ'()10.Ḅᐵ{53,87,12,61,35,48},ᑏᑖ?ᵨᑈ!᣸9:Fᐭ᣸"#K᣸ᑡḄᔜ'()஺11.Ḅᐵᑡ{45,19,81,58,12,33,20,65,77,28},ᑏᵨIIᓫ⌱<᣸"#K᣸ᑡḄᔜ'()஺12.Ḅᐵᑡ{45,19,81,58,12,33,20,65,77,28},ᑏᵨ9:Fᐭ᣸"#K᣸ᑡḄᔜ'()஺13.Ḅᐵᑡ{45,19,81,58,12},ᑖ?ᑏᵨ9:Fᐭ᣸56᣸"#K᣸ᑡḄᔜ'()14.Ḅᐵᑡ{45,19,81,58,12},ᑖ?ᑏᵨ9:Fᐭ᣸56᣸"#K᣸ᑡḄᔜ'()15.Ḅᐵᑡ{45,19,81,58,12},ᑖ?ᑏᵨ9:Fᐭ᣸56᣸"#ᓣ᣸ᑡḄᔜ'()஺L.*M⚪1.Ꮇ*PQ᪛Ḅ(STUV᝞XCtypedefstructnodeintdata;structnode*lchild,*rchild;JBstree;᦮UZ[-1\/(][ᑏPQ᣸᪛Ḅ^ᡂ`a஺2.ᑏᵨ9:Fᐭ᣸"#ᓣ᣸Ḅ஺

3803.ᑏᵨᑈ!᣸"#ᓣ᣸Ḅ஺4.ᙠᢥᐵᓣ᣸ᑡḄ᦮Udឋ⊤fFᐭᐗh[Fᐭ=ijkdឋ⊤lᯠᨵ஺⌕1ᵨ9:Fᐭ᣸foFᐭḄpq஺rsC1.᦮UZ[-1\/(][ᑏPQ᣸᪛Ḅ^ᡂ`a஺voidinsert(BiTreet,Bstree*s)஻usFᐭᑮt/᪷ḄPQ᣸᪛f{if(s->datadata){if(t->lchild==NULL)t->lchild=s;elseinsert(t->lchild,s);)else{if(t->rchild==NULL)t->rchild=s;elseinsert(t->rchild,s);)}Bstree*bstreecreate()/*PQ᣸᪛Ḅ^ᡂ*/{intx;Bstree*s,*t;t=NULL;printf(Hinputtheelementsofbstree,endflagis-l

381");scanf(u%d",&x);while(x!=-l){s=(BiTNode*)malloc(sizeof(BiTNode));s->data=x;s->lchild=s->rchild=NULL;if(t==NULL)t=s;elseinsert(t,s);scanf("%d"&x);z)return(t);)2.ᑏᵨ9:Fᐭ᣸"#ᓣ᣸Ḅ஺voidins_sort(datatypeR[]Jntn){inti;for(i=2;i<=n;i++){R[0]=R[i]z

382while(R[O].key

3835.¤¥ᨵ⊤/(12,18,24,35,47,50,62,83,90,115,134)¦ᵨPᑖ}~18[◤______________}~ᡂ஺6.¨¥PQ᣸᪛[o`,ªjᑮ(SḄᨵᑡ஺7.*«¬⊤⊤M/100,ᵨ◀ᶇ°ᦪ᪀⌼«¬³ᦪ[ᓽH(K)=KMODP(P<=M),/i³ᦪᐹᨵµឋ[P¶⌱8.ᒹ¸ᦪBᐗhḄFᐭᑤ◀º\Ḅ}~/}~஺9.ᒹ¸ᦪBᐗhḄFᐭᑤ◀º\Ḅ}~/}~10.ᑖᙽ}~Ḅ¼½11.᪷BᐗhḄᐵṹ¾ᐗh¿ÀÁÂḄ¿ÀÃÄ¿À12.ᙠ«¬}~f[ᐗhᐵZÅᐸᙠ«¬⊤f¿ÇÁÂḄ¶ᐵÈ/13.ᙠ«¬}~f[ᐵZ¶ᑮ«¬ᙢᙬḄËÌ/14.ᙠᨵ⊤(41,62,75,77,82,95,100)"#Pᑖ}~[}~ᐵ/82ḄᦪBᐗh◤⌕Ḅᦪ஺15.ᙠ(Sᦪ¾ḄPQ᣸᪛"#}~ḄÍᙳ}~ÏÅPQ᪛ḄÐ᝱ᨵᐵ[ᨬµḄÒÓPQ᣸᪛/᪛Ḅ᎛஺P.Õs⚪1.PQ᣸᪛ᐵᑡ[ᐸfÖᨵ×Ḅᐵ[Øᐵ,^ᡂḄPQ᣸᪛ÙÙlÚᐭᐵ{50,28,73,91,56,18,34,86},Ûᡠ^ᡂḄPQ᣸᪛[ÜᑏᐸfÝᔊᑡ஺2.Ûßàn=8(ᐹᨵ8-.)Ḅᢚ}~(ᓽPᑖ}~)`aᑨ᪛[ÜM}~ᡂḄÍᙳ}~ÏASL(Ꮇ}~-.Ḅᭆ᳛×ä)஺3.*+,-.ᐵåᔠ/(25,10,8,27,32,68),«¬⊤ᙢᙬçè/0~7,«¬³ᦪH(k)=kmod7,ᵨdឋéêëᦣᑡ\/ríîïḄ*M«¬⊤[uᐸᑁñᐭX⊤஺ÜMASL஺«¬⊤ᙢᙬ஺OPI432“3“ô5~6Kᐵ஺3**■p4.᣸PQ᪛(᪀᝞X[ᔜ(SḄZòᑮᜧl/1~8,E᪗ᔜ(SḄZ

3845.ᐵṹᑡ11,78,10,1,3,2,4,21,ᑖ?ᵨdឋéêõöᜐᳮîï[ùÛú¶Ḅᦣᑡ¿ÀÐÃ,Ü1û}~ḄᡂÍᙳ}~Ï஺ᦣᑡ³ᦪHashkey=key%llo6.ᐵåᔠ/47,7,29,11,16,92,22,8,3,13,ᙢᙬçè/0~10,᪀⌼ᔠᳮḄ«¬³ᦪ[ᵨdឋéêëᦣᑡᜐᳮîï[Û«¬⊤Ü1Íᙳ}~ÏASL஺ü2+4+2=8ᑖý«¬³ᦪC«¬⊤C•ᙢᙬ“012345678910.ᐵ஺2♦3p*5ᙳASL=7.ᨵᐵᑡ7,8,9,16,15,18,ᵨ◀ᶇ᪀⌼ᦪhashkey=key%7ᵨᙢᙬᜐᳮ!"#$ᐸᦣᑡᑮᙢᙬ()0~6*+#,1-.ᐸ/0ᙢᙬ,21./0Ḅ⊤,3-.ᐸᙳ஺,1+5+2=8ᑖ58.6789⊤᝞;ᡠ=#ᐸᙢᙬ()>0~10,ᦪ>Hashk=k%ll,!"ᜐᳮ?>AឋCDEᦣᑡ஺ᙢᙬ.#0#2,3஺4.#5M6.7“8“%10,ᐵN.66,45-78c32O54஻48.62.30.18.2bFGH;I⚪:

385(1)ᙠR⊤S#ᙠTUᙢᙬSVWX!"Y(2ᑖ)(2)ᙠᐗ]32ஹ54_21`ᔜ◤⌕defghijY(3ᑖ)(3)klmᭆ᳛ᩩq;ᡂs`Ḅᙳ஺(3ᑖ)9.⊤Ḅᙢᙬ()>0~6,ᦪ>H(k)=k%7,ᵨthCDEᦣᑡᜐᳮ!"#᝞$ᐵᑡ(9,11,8,13,15,10)uhvwᑮ⊤+#xᑏ;☢Ḅᙢᙬ⊤_WᡂḄ⊤#{kl.ᙠR⊤SdeḄᙳ஺(2+4+2=8ᑖ)ᙢᙬ⊤.ᐵN#%1L8-13#15஺10.ᙢᙬ஺0⊤“ᙢᙬ,0.2,3஺4,5#6~ᐵ332*N#ᙳASL=10.ᨵᐵᑡ(13,10,6,14,21,17),ᵨ◀ᶇ᪀⌼ᦪ#ᵨAឋCEᦣᑡ$ᐸᦣᑡᑮᙢᙬ()0~6*+#Iজ◀ᶇ+◀ᦪp᝞⌱#Hg!"YRᵨ◀ᶇ᪀⌼Ḅᦪ>Yঝ1./0Ḅᙢᙬ⊤_⊤஺ঞ-.mᭆ᳛ᩩq;Ḅᙳ(2+4+2=8ᑖ)11.⊤Ḅᙢᙬ()>0~9,ᦪ>H(k)=k%7,ᵨAឋCDEᦣᑡᜐᳮ!"#᝞$ᐵᑡ(9,11,16,10,15,12,,24,20,18)uhvwᑮ⊤+#xᑏ;☢Ḅᙢᙬ⊤_WᡂḄ⊤#{kl.ᙠR⊤SdeḄᙳ஺(2+4+2=8ᑖ)

386Jᙢᙬ⊤.ᐵN#%1b16#10P15P24.20P1Qᙢᙬ23pPp3⊤.ᙢᙬ஺0.,2P3P4P5~627*8%ᓱᐵN.a•13•33♦12.Ꮇ⊤Ḅᙢᙬ()>0-6,ᦪ>H(k)=k%7,ᵨthCDEᦣᑡᜐᳮ!"#᝞$ᐵᑡ(26,72,35,8,18,60)uhvwᑮ⊤+#(1)᪷ᦪkl9ᐵ/0Ḅᙢᙬ{1.WᡂḄ⊤(2)kl.ᙠR⊤SdeḄᙳ஺(6+2=8ᑖ)ᙢᙬ⊤.ᐵ஺26#72.35.8#18#60-ᙢᙬ.#4)32♦⊤•ᙢᙬ஺0஺2஻3஻4#5஻6Pᐵ“3222♦52aASL=13.⊤Ḅᙢᙬ()>0~9,ᦪ>H(k)=k%7,ᵨthCDEᦣᑡᜐᳮ!"#᝞$ᐵᑡ(9,11,16,10,15,12,,24,20,18)uhvwᑮ⊤+#xᑏ;☢Ḅᙢᙬ⊤_WᡂḄ⊤#{kl.ᙠR⊤SdeḄᙳ஺(2+4+2=8ᑖ)ᙢᙬ⊤.ᐵN஺9.1b1610P15P12“24.20.18O♦ஹᙢᙬ.#⊤“ᙢᙬ஺OPL2-3஺4.5P6“7.8°%ᐵN#4}•>1pᙳASL="14.6789⊤᝞ᡠ=#ᐸᙢᙬ()>0~10,ᦪ>Hash(k)=k%ll,!"ᜐᳮ?>thCDEᦣᑡ஺!"ᜐᳮ?>thCDEᦣᑡ஺ᙢᙬ.#OPL2P3c425#6~7஺8#%10.RN.66,45c78~54஻48.#*18P62°30O32.2b

387FGH;I⚪(1)ᙠR⊤S#ᙠTUᙢᙬSVWX!"Y(2ᑖ)(2)ᙠᐗ]32ஹ54_21`ᔜ◤⌕defghijY(3ᑖ)(3)klmᭆ᳛ᩩq;ᡂs`Ḅᙳ஺(3ᑖ)15.ᐵᔠ>{47,7,29,11,16,92,22,8,3,13),ᙢᙬ)>0~10,᪀⌼ᔠᳮḄᦪ#ᵨᙢᙬᜐᳮ!"#1.⊤{-.ᙳASL஺(2+4+2=8ᑖ).lk⚪1.ᑏ.ᙠ⊤+detᑖḄ⌴l஺2.ᑏ.ᙠ⊤+detᑖḄ⌴l஺3.Ꮇt᪛Ḅ¡¢£¤᝞;typedefstructnode(intdata;structnode*lchild*rchild;/JBstree;ᑏ.ᙠt᣸᪛+deḄl஺4.Ꮇt᣸᪛tḄᔜ9ᐗ]N>᦮¢§ᙳ¨©ª#£¤¡¢{k89lᢥ⌴h¬.ᔜᐗ]ḄN஺G1.intBinary_Search(S_TBL*tbl,keytypekx){intlow,high,mid;low=l;high=tbl->last;while(low<=high){mid=(low+high)/2;if(kxdata[mid].key)high=mid-l;elseif(kx>tbl->data[mid].key)low=mid+l;elsereturnmid;}return0;}2.ᑏ.ᙠ⊤+detᑖḄ⌴l஺intBSearch(S_TBL*tbl,keytypekx,intlowjnthigh)/*ᙠ;°>low,S°>highḄAឋ⊤tbl+ᢚ²ᐵ>kxḄᐗ]*/{intmid;if(low>high)return-1;mid=(low+high)/2;if(kx==tbl->data[mid].key)returnmid;if(kxdata[mid].key)return(BSearch(tbl,kxJowmid-l));zreturn(BSearch(tblkxmid+l,high));//}

3883.ᑏ.ᙠt᣸᪛+deḄl஺BiTNode*SearchData(BiTreet,KeyTypekx)/*ᙠt᣸᪛tSᐵṹ>kxḄᐗ]#ᑮ´FᐸᡠᙠµḄᢣ┐#ᔲᑣ´F89(ᢣ┐*/{BiTNode*q=t;while(q){if(kx>q->data.key)q=q->rchild;/*ᙠº»᪛+*/elseif(kxdata.key)q=q->lchild;/*ᙠ¼»᪛+7elsereturnq;/*ᡂs*/)returnNULL;/*¨ᡂs*/4.typedefstructnode{intdata;structnode*lchild,*rchild;JBstree;voidbianli(Bstree*bt){if(bt!=NULL){bianli(bt->rchild);printf("%5d,",bt->data);bianli(bt->lchild);))

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
最近更新
更多
大家都在看
近期热门
关闭