µÚ1ÕÂÐ÷ÂÛ
Ò»¡¢Ñ¡ÔñÌ⣨ÿСÌâ2·Ö£¬¹²20·Ö£© 1.ÒÔÏÂÄÄÒ»¸ö²»ÊÇËã·¨µÄÌØÐÔ£¨ £©¡£
A.ÓÐÇîÐÔ B.È·¶¨ÐÔ C.¼ò½àÐÔ D.¿ÉÐÐÐÔ 2.Êý¾Ý½á¹¹µÄ¶¨ÒåΪ(D£¬S)£¬ÆäÖÐDÊÇ( )µÄ¼¯ºÏ¡£
A. Ëã·¨ B. Êý¾ÝÔªËØ C. Êý¾Ý²Ù×÷ D. Âß¼½á¹¹
3.ÉènÊÇÃèÊöÎÊÌâ¹æÄ£µÄ·Ç¸ºÕûÊý£¬ÏÂÃæ³ÌÐòƬ¶ÎµÄʱ¼ä¸´ÔÓ¶ÈÊÇ£¨ £©¡£ x=2£»
while(x 2 A. O(log2n) B. O(n) C. O(nlog2n) D. O(n) 4.Ö´ÐÐÏÂÃæ³ÌÐò¶Îʱ£¬Ö´ÐУÓÓï¾äµÄ´ÎÊýΪ£¨ £©£® for £¨int i=1£»i<=n£»i++£© for (int j=1£» j<=i£» j++) S£» A. n2 B. n2/2 C. n(n+1) D. n(n+1)/2 5.ÔÚÏÂÃæµÄ³ÌÐò¶ÎÖУ¬¶ÔxµÄ¸³ÖµÓï¾äµÄƵ¶ÈΪ£¨ £©¡£ for(i=1£»i<=n;i++) for(j=1£»j<=n£»j++) x=x+1; 2 A. O(2n) B. O(n) C. O(n) D. O(log2n) 6.ÔÚÊý¾Ý½á¹¹µÄÌÖÂÛÖаÑÊý¾Ý½á¹¹´ÓÂß¼ÉÏ·ÖΪ £¨ £©¡£ A. ÄÚ²¿½á¹¹ÓëÍⲿ½á¹¹ B. ¾²Ì¬½á¹¹Ó붯̬½á¹¹ C. ÏßÐԽṹÓë·ÇÏßÐԽṹ D. ½ô´Õ½á¹¹Óë·Ç½ô´Õ½á¹¹¡£ 7.ÏÂÃæ³ÌÐò¶ÎµÄʱ¼ä¸´ÔÓ¶ÈΪ£¨ C £© for (int i=0 £»i for (int j=0 £»j 22 A.O(m) B.O(n) C.O(m*n) D.O(m+n) 8.Ëã·¨µÄ¼ÆËãÁ¿µÄ´óС³ÆΪ¼ÆËãµÄ£¨ £©¡£ A£®Ð§ÂÊ B. ¸´ÔÓÐÔ C. ÏÖʵÐÔ D. ÄÑ¶È 9.Êý¾Ý½á¹¹ÔÚ¼ÆËã»úÄÚ´æÖеıíʾÊÇÖ¸£¨ £©¡£ A£®Êý¾ÝµÄ´æ´¢½á¹¹ B£®Êý¾Ý½á¹¹ C£®Êý¾ÝµÄÂß¼½á¹¹ D£®Êý¾ÝÔªËØÖ®¼äµÄ¹Øϵ 10.ÔÚÊý¾Ý½á¹¹ÖУ¬ÓëËùʹÓõļÆËã»úÎ޹صÄÊÇÊý¾ÝµÄ£¨ £©½á¹¹¡£ A£®Âß¼ B£®´æ´¢ C£®Âß¼ºÍ´æ´¢ D£®ÎïÀí 11.ÔÚ´æ´¢Êý¾Ýʱ£¬Í¨³£²»½öÒª´æ´¢¸÷Êý¾ÝÔªËصÄÖµ£¬¶øÇÒ»¹Òª´æ´¢£¨ £©¡£ A£®Êý¾ÝµÄ´¦Àí·½·¨ B£®Êý¾ÝÔªËصÄÀàÐÍ C£®Êý¾ÝÔªËØÖ®¼äµÄ¹Øϵ D£®Êý¾ÝµÄ´æ´¢·½·¨ 12.ÔÚ¾ö¶¨Ñ¡È¡ºÎÖÖ´æ´¢½á¹¹Ê±£¬Ò»°ã²»¿¼ÂÇ£¨ £©¡£ A£®¸÷½áµãµÄÖµÈçºÎ B£®½áµã¸öÊýµÄ¶àÉÙ C£®¶ÔÊý¾ÝÓÐÄÄЩÔËËã D£®ËùÓõıà³ÌÓïÑÔʵÏÖÕâÖֽṹÊÇ·ñ·½±ã¡£ 13.Ëã·¨·ÖÎöµÄÄ¿µÄÊÇ£¨ £©£¬Ëã·¨·ÖÎöµÄÁ½¸öÖ÷Òª·½ÃæÊÇ£¨ £©¡£ £¨1£©A£®ÕÒ³öÊý¾Ý½á¹¹µÄºÏÀíÐÔ B£®Ñо¿Ëã·¨ÖеÄÊäÈëºÍÊä³öµÄ¹Øϵ C£®·ÖÎöËã·¨µÄЧÂÊÒÔÇó¸Ä½ø D£®·ÖÎöËã·¨µÄÒ׶ÁÐÔºÍÎĵµÐÔ £¨2 £©A£®¿Õ¼ä¸´ÔӶȺÍʱ¼ä¸´ÔÓ¶È B£®ÕýÈ·ÐԺͼòÃ÷ÐÔ C£®¿É¶ÁÐÔºÍÎĵµÐÔ D£®Êý¾Ý¸´ÔÓÐԺͳÌÐò¸´ÔÓÐÔ 15.ͨ³£ÒªÇóͬһÂß¼½á¹¹ÖеÄËùÓÐÊý¾ÝÔªËؾßÓÐÏàͬµÄÌØÐÔ£¬ÕâÒâζ×Å£¨ £©¡£ A£®Êý¾ÝÔªËؾßÓÐͬһÌصã B£®²»½öÊý¾ÝÔªËØËù°üº¬µÄÊý¾ÝÏîµÄ¸öÊýÒªÏàͬ£¬¶øÇÒ¶ÔÓ¦µÄÊý¾ÝÏîµÄÀàÐÍÒªÒ»Ö C£®Ã¿¸öÊý¾ÝÔªËض¼Ò»Ñù D£®Êý¾ÝÔªËØËù°üº¬µÄÊý¾ÝÏîµÄ¸öÊýÒªÏàµÈ 16.ÒÔÏÂ˵·¨ÕýÈ·µÄÊÇ£¨ £©¡£ A£®Êý¾ÝÏîÊÇÊý¾ÝµÄ»ù±¾µ¥Î» B£®Êý¾ÝÔªËØÊÇÊý¾ÝµÄ×îСµ¥Î» C£®Êý¾Ý½á¹¹ÊÇ´ø½á¹¹µÄÊý¾ÝÏîµÄ¼¯ºÏ D£®Ò»Ð©±íÃæÉϺܲ»ÏàͬµÄÊý¾Ý¿ÉÒÔÓÐÏàͬµÄÂß¼½á¹¹ ¶þ¡¢ÅжÏÌ⣨ÿСÌâ1·Ö£¬¹²10·Ö£© 1.Êý¾ÝÔªËØÊÇÊý¾ÝµÄ×îСµ¥Î»¡££¨ £© 2.Ëã·¨¿ÉÒÔÓò»Í¬µÄÓïÑÔÃèÊö£¬Èç¹ûÓÃCÓïÑÔ»òPASCALÓïÑԵȸ߼¶ÓïÑÔÀ´ÃèÊö£¬ÔòË㷨ʵ¼ÊÉϾÍÊdzÌÐòÁË¡££¨ £© 3.Êý¾ÝµÄÂß¼½á¹¹ÊÇÖ¸Êý¾ÝµÄ¸÷Êý¾ÝÏîÖ®¼äµÄÂß¼¹Øϵ¡££¨ £© 4.Ëã·¨µÄÓÅÁÓÓëËã·¨ÃèÊöÓïÑÔÎ޹أ¬µ«ÓëËùÓüÆËã»úÓйء££¨ £© 5.Êý¾Ý½á¹¹¸ÅÄî°üÀ¨Êý¾ÝÖ®¼äµÄÂß¼½á¹¹£¬Êý¾ÝÔÚ¼ÆËã»úÖеĴ洢·½Ê½ºÍÊý¾ÝµÄÔËËãÈý¸ö·½Ãæ¡£( ) 6.ÔÚ¾ö¶¨Ñ¡È¡ºÎÖÖ´æ´¢½á¹¹Ê±£¬Ò»°ã²»¿¼ÂǸ÷½áµãµÄÖµÈçºÎ¡££¨ £© 7.³éÏóÊý¾ÝÀàÐÍ£¨ADT£©°üÀ¨¶¨ÒåºÍʵÏÖÁ½·½Ã棬ÆäÖж¨ÒåÊǶÀÁ¢ÓÚʵÏֵģ¬¶¨Òå½ö¸ø³öÒ»¸öADTµÄÂß¼ÌØÐÔ£¬²»±Ø¿¼ÂÇÈçºÎÔÚ¼ÆËã»úÖÐʵÏÖ¡£( ) 8.³éÏóÊý¾ÝÀàÐÍÓë¼ÆËã»úÄÚ²¿±íʾºÍʵÏÖÎ޹ء££¨ £© 9.˳Ðò´æ´¢½á¹¹Ö»ÄÜÓÃÓÚÏßÐԽṹ£¬²»ÄÜÓÃÓÚ·ÇÏßÐÔÐͽṹ¡££¨ £© 10.½¡×³µÄËã·¨²»»áÒò·Ç·¨µÄÊäÈëÊý¾Ý¶ø³öÏÖĪÃûÆäÃîµÄ״̬¡££¨ £© 11.ÔÚÊý¾Ý½á¹¹µÄÌÖÂÛÖаÑÊý¾Ý½á¹¹´ÓÂß¼ÉÏ·ÖΪÄÚ²¿½á¹¹ÓëÍⲿ½á¹¹¡££¨ £© 12.Êý¾ÝÏîÊÇÊý¾ÝµÄ»ù±¾µ¥Î»¡££¨ £© Èý¡¢Ìî¿ÕÌ⣨ÿ¿Õ1·Ö£¬¹²10·Ö£© 1.ͨ³£´ÓËĸö·½ÃæÆÀ¼ÛËã·¨µÄÖÊÁ¿£º_________¡¢_________¡¢_________ºÍ_________¡£ 2.¸ù¾ÝÊý¾ÝÔªËØÖ®¼äµÄ¹Øϵ²»Í¬£¬Í¨³£ÓÐÒÔÏÂËÄÖֽṹ£¬ ¡¢ ¡¢ ºÍÍø×´½á¹¹¡£ 3.Êý¾ÝµÄÎïÀí½á¹¹Ö÷ÒªÓÐ_____________ºÍ______________Á½ÖÖ²»Í¬µÄ±íʾ·½·¨¡£ 4.Êý¾ÝÔªËØÖ®¼äµÄ¹ØϵÔÚ¼ÆËã»úÖÐÓÐÁ½ÖÖ²»Í¬µÄ±íʾ·½·¨£º ºÍ 5.Ëã·¨µÄ5¸öÖØÒªÌØÐÔÊÇ_________¡¢__________¡¢__________¡¢ÊäÈëºÍÊä³ö¡£ 6. Ò»¸öËã·¨µÄЧÂÊ¿É·ÖΪ ЧÂÊºÍ Ð§ÂÊ¡£ 7.ÏÂÃæ³ÌÐò¶ÎµÄʱ¼ä¸´ÔÓ¶ÈÊÇ ¡£ for (i=0 £»i for(j=0 £»j for (j=0 £»j 9. Êý¾Ý½á¹¹ÖÐÆÀ¼ÛËã·¨µÄÁ½¸öÖØÒªÖ¸±êÊÇËã·¨µÄ__________ ºÍ__________ ¡£ 10.¼ÆËã»úÖ´ÐÐÏÂÃæµÄÓï¾äʱ£¬Óï¾äsµÄÖ´ÐдÎÊýΪ _______¡£ FOR(i=l£»i 11.Êý¾Ý½á¹¹ÊÇÑÐÌÖÊý¾ÝµÄ__________ºÍ__________£¬ÒÔ¼°ËüÃÇÖ®¼äµÄÏ໥¹Øϵ£¬²¢¶ÔÓëÕâÖֽṹ¶¨ÒåÏàÓ¦µÄ__________£¬Éè¼Æ³öÏàÓ¦µÄ__________¡£ 12.Êý¾ÝµÄÎïÀí½á¹¹°üÀ¨_________µÄ±íʾºÍ_________µÄ±íʾ¡£ 13.Ò»¸öËã·¨¾ßÓÐ5¸öÌØÐÔ: __________¡¢__________¡¢__________£¬ÓÐÁã¸ö»ò¶à¸öÊäÈë¡¢ÓÐÒ»¸ö»ò¶à¸öÊä³ö¡£ 14.³éÏóÊý¾ÝÀàÐ͵Ķ¨Òå½öÈ¡¾öÓÚËüµÄÒ»×é_________£¬¶øÓë_________Î޹أ¬¼´²»ÂÛÆäÄÚ²¿½á¹¹ÈçºÎ±ä»¯£¬Ö»ÒªËüµÄ__________²»±ä£¬¶¼²»Ó°ÏìÆäÍⲿʹÓᣠ15.Ò»¸öÊý¾Ý½á¹¹ÔÚ¼ÆËã»úÖÐ_________³ÆΪ´æ´¢½á¹¹¡£ 16.ÔÚÓÐn¸öÑ¡Êֲμӵĵ¥Ñ»·ÈüÖУ¬×ܹ²½«½øÐÐ______³¡±ÈÈü¡£ 17.¶ÔÓÚ¸ø¶¨µÄn¸öÔªËØ£¬¿ÉÒÔ¹¹Ôì³öµÄÂß¼½á¹¹ÓÐ_______£¬_______£¬_______£¬______ËÄÖÖ¡£ 18.Êý¾ÝµÄÂß¼½á¹¹ÊÇÖ¸_________________________________________________________¡£ ²Î¿¼Ì⣺ 20.ÏÂÃæ³ÌÐò¶ÎµÄʱ¼ä¸´ÔÓ¶ÈΪ________¡£(n>1) ´ð°¸O(n) sum=1£» for (i=0 £»sum 21.ÏÂÃæ³ÌÐò¶ÎµÄʱ¼ä¸´ÔÓ¶ÈÊÇ£¨ O(log3n) £©¡£ i £½ 0 £» while £¨i<=n £© i = i * 3 £» 22.Éèm,n¾ùΪ×ÔÈ»Êý£¬m¿É±íʾΪһЩ²»³¬¹ýnµÄ×ÔÈ»ÊýÖ®ºÍ£¬f(m,n)ΪÕâÖÖ±íʾ·½Ê½µÄÊýÄ¿¡£Àýf(5,3)=5£¬ÓÐ5ÖÖ±íʾ·½Ê½£º3+2£¬3+1+1£¬2+2+1£¬2+1+1+1£¬1+1+1+1+1¡£ ¢ÙÒÔÏÂÊǸú¯ÊýµÄ³ÌÐò¶Î£¬Ç뽫δÍê³ÉµÄ²¿·ÖÌîÈ룬ʹ֮ÍêÕû int f(m,n) int m,n; { if(m==1) return __(1)___; if(n==1){ return __(2)___;} if(m {return f(m,m);} if (m==n) {return 1+__(3)___;} return f(m.n-1)+f(m-n,___(4)___); } ¢ÚÖ´ÐгÌÐò£¬f(6,4)=_______¡£ ´ð°¸¢Ù (1)1 (2)1 (3)f(m,n-1) (4)n ¢Ú 9 23.ÏÂÃæ³ÌÐò¶ÎµÄʱ¼ä¸´ÔÓ¶ÈΪ________¡£(n>1) ´ð°¸ O(n) sum=1£» for (i=0;sum 24.ÏÂÃæ³ÌÐò¶ÎÖдøÓÐÏ»®ÏßµÄÓï¾äµÄÖ´ÐдÎÊýµÄÊýÁ¿¼¶ÊÇ_______¡£´ð°¸ log2n i£º=n*n WHILE i<>1 DO i:=i_div_2; 25.ÏÂÃæ³ÌÐò¶ÎÖдøÏ»®ÏßµÄÓï¾äµÄÖ´ÐдÎÊýµÄÊýÁ¿¼¶ÊÇ_______¡£´ð°¸ nlog2n i:=1; WHILE i 26.ÏÂÃæ³ÌÐò¶ÎÖдøÏ»®ÏßµÄÓï¾äµÄÖ´ÐдÎÊýµÄÊýÁ¿¼¶ÊÇ£º_________´ð°¸ log2n i£º=1£» WHILE i ´ð°¸1+25.ÔÚÏÂÃæµÄ³ÌÐò¶ÎÖУ¬¶Ô£øµÄ¸³ÖµÓï¾äµÄƵ¶ÈΪ______£¨±íʾΪnµÄº¯Êý£©¡££¨1+2++ 3 £¨1+2+3£©+?+£¨1+2+?+n£©=n(n+1)(n+2)/6 O(n) FOR i£º£½£± TO n DO FOR j£º£½£± TO i DO FOR k£º£½1 TO j DO £ø£º£½£ø£«delta£» 27.ÒÑÖªÈçϳÌÐò¶Î FOR i:= n DOWNTO 1 DO {Óï¾ä1} BEGIN x:=x+1£» {Óï¾ä2} FOR j:=n DOWNTO i DO {Óï¾ä3} y:=y+1; {Óï¾ä4} END£» Óï¾ä1Ö´ÐеÄƵ¶ÈΪ__________£»Óï¾ä2Ö´ÐеÄƵ¶ÈΪ__________£»Óï¾ä3Ö´ÐеÄƵ¶ÈΪ__________£»Óï¾ä4Ö´ÐеÄƵ¶ÈΪ___________¡£´ð°¸n+1 n n(n+3)/2 n(n+1)/2¡£ ËÄ¡¢¼ò´ðÌ⣨¹²10·Ö£© 1.ʲôÊÇËã·¨? Ëã·¨µÄ5¸öÌØÐÔÊÇʲô? ÊÔ¸ù¾ÝÕâЩÌØÐÔ½âÊÍËã·¨Óë³ÌÐòµÄÇø±ð¡£ 2.Êý¾ÝµÄÂß¼½á¹¹·ÖΪÏßÐԽṹºÍ·ÇÏßÐԽṹÁ½´óÀà¡£ÏßÐԽṹ°üÀ¨ÏßÐÔ±í¡¢Õ»¡¢¶ÓÁС¢Êý×éµÈ£»·ÇÏßÐԽṹ°üÀ¨Ê÷¡¢Í¼µÈ£»ÕâÁ½Àà½á¹¹¸÷×ÔµÄÌصãÊÇʲô£¿ 3.¼òÊöÏÂÁиÅÄÊý¾Ý¡¢Êý¾ÝÔªËØ¡¢Êý¾ÝÀàÐÍ¡¢Êý¾Ý½á¹¹¡¢Âß¼½á¹¹¡¢´æ´¢½á¹¹¡¢ÏßÐԽṹ¡¢·ÇÏßÐԽṹ¡£ ²Î¿¼Ì⣺ 4.ÊÔÃèÊöÊý¾Ý½á¹¹ºÍ³éÏóÊý¾ÝÀàÐ͵ĸÅÄîÓë³ÌÐòÉè¼ÆÓïÑÔÖÐÊý¾ÝÀàÐ͸ÅÄîµÄÇø±ð£¿ ´ð°¸¼òµ¥À´Ëµ£¬Êý¾Ý½á¹¹¶¨ÒåÁËÒ»×鰴ijЩ¹Øϵ½áºÏÔÚÒ»ÆðµÄÊý¾ÝÔªËØ£»³éÏóÊý¾ÝÀàÐÍÊÇÖ¸Ò»¸öÊýѧģÐÍÒÔ¼°¶¨ÒåÔÚ¸ÃÄ£ÐÍÉϵÄÒ»×é²Ù×÷£»¶ø³ÌÐòÉè¼ÆÓïÑÔÖеÄÊý¾ÝÀàÐͲ»½ö¶¨ÒåÁËÒ»×é´ø½á¹¹µÄÊý¾ÝÔªËØ£¬¶øÇÒ»¹ÔÚÆäÉ϶¨ÒåÁËÒ»×é²Ù×÷¡£ 5.Ëã·¨µÄʱ¼ä¸´ÔӶȽöÓëÎÊÌâµÄ¹æÄ£Ïà¹ØÂð? ´ð°¸²»ÊÇ,ÊÂʵÉÏ£¬Ëã·¨µÄʱ¼ä¸´ÔӶȲ»½öÓëÎÊÌâµÄ¹æÄ£Ïà¹Ø£¬»¹ÓëÊäÈëʵÀýÖеÄÔªËØÈ¡ÖµµÈÏà¹Ø£¬µ«ÔÚ×µÄÇé¿öÏ£¬Æäʱ¼ä¸´ÔӶȾÍÊÇÖ»ÓëÇó½âÎÊÌâµÄ¹æÄ£Ïà¹ØµÄ¡£ÎÒÃÇÔÚÌÖÂÛʱ¼ä¸´ÔÓ¶Èʱ£¬Ò»°ã¾ÍÊÇÒÔ×Çé¿öϵÄʱ¼ä¸´ÔÓ¶ÈΪ׼µÄ¡£ 6.³£ÓõĴ洢±íʾ·½·¨ÓÐÄļ¸ÖÖ? ´ð°¸³£ÓõĴ洢±íʾ·½·¨ÓÐËÄÖÖ: ˳Ðò´æ´¢·½·¨£ºËüÊÇ°ÑÂß¼ÉÏÏàÁڵĽáµã´æ´¢ÔÚÎïÀíλÖÃÏàÁڵĴ洢µ¥ÔªÀ½áµã¼äµÄÂß¼¹ØϵÓÉ´æ´¢µ¥ÔªµÄÁÚ½Ó¹ØϵÀ´ÌåÏÖ¡£Óɴ˵õ½µÄ´æ´¢±íʾ³ÆΪ˳Ðò´æ´¢½á¹¹¡£ 2