1、 1. - 2001 22A. B. C. D. 2. ,( ),( )n,( ), ( ),( ), : A. B. C. D. : A. n-1 B. n C. n+1 D. n/2: A. B. C. D. : A. .B. .C. .D. ,. 1997 15 1999 153. 123-nni1=i=n A. B. n-i+1 C. i D. n-i 1999 9(1)4. 1,2,3,-,nij A. i-j-1 B. i-j C. j-i+1 D. 2000 35. 1,2,3,-,np1,p2,p3-pN,pNnpi( )A. i B. n-i C. n-i+1 D. 2001
2、 11.56. 654321 A. 5 4 3 6 1 2 B. 4 5 3 1 2 6 C. 3 4 6 5 2 1 D. 2 3 4 1 5 6 2001 327. 1234, 200010(2)A. 1243 B. 2134 C. 1432D. 4312 E. 32148. 1 2 3 4 5 A. 2 3 4 1 5 B. 5 4 1 3 2 C. 2 3 1 4 5 D. 1 5 4 3 2 2000 1 2001 4 (1) 2000 229. 12345, A. 5 1 2 3 4 B. 4 5 1 3 2 C. 4 3 1 2 5 D. 3 2 1 5 4 2001 1210.
3、 a, bc d, A. acbd B. b, cda C. c, db, a D. d, cab 2000 32 1999 3211. abcdef, Afedcba B. bcafed C. dcefba D. cabdef 1996 9212. XYZ( )AXYZ B. YZX C. ZXY D. ZYX 1997 5213. ABCCBA- 1999 8(1)A. push,pop,push,pop,push,pop B. push,push,push,pop,pop,popC. push,push,pop,pop,push,pop D. push,pop,push,push,pop
4、,pop14. V1.ntopn+1x( )Atop:=top+1; V top:=x B. V top:=x; top:=top+1C. top:=top-1; V top:=x D. V top:=x; top:=top-1 1998 13215. V1.mtopii( i =1,2)1v12Vm A. |top2-top1|=0 B. top1+1=top2 C. top1+top2=m D. top1=top2 1999 14116. 1998 32A. B. C. D. A17. 2000 2A. B. C. D.18. i - 2000 6 (3)int f(int x) retu
5、rn (x0) ? x* f(x-1):2);int i ;i =f(f(1);A2 B. 4 C. 8 D. 19. a*(b+c)-d( ) 2001 21.5Aabcd*+- B. abc+*d- C. abc*+d- D. -+*abcd20. 3* 2(4+2*2-6*3)-56 A. 3,2,4,1,1(*(+*- B. 3,2,8(*- C. 3,2,4,2,2(*(- D. 3,2,8(*(- 2000 5221. A B. C. D. 1996 6222. 2001 122A. B. C. D. 23. ,( ) 2001 32A B. C. D. ,24. A B C D.
6、 1998 1225. Am-,frontrear 2001 23A(rear-front+m)%m Brear-front+1 C(front-rear+m)%m D(rear-front)%m26. -A0.m-1frontrear( ) 2001 51.5A. (rear-front+m)%m B. rear-front+1 C. rear-front-1 D. rear-front27. -A0.m 1999 61A. rear=rear+1 B. rear=(rear+1) mod (m-1)C. rear=(rear+1) mod m D. rear=(rear+1)mod(m+1
7、)28. 6-rearfront03rearfront( )-1999 1(4)A. 1 5 B. 24 C. 42 D. 5129. abcd - A. dacb B. cadb C. dbca D. bdac E. 1996 3 (3)30. 1234( ) 1996 52A. 1234 B. 4132 C. 4231 D. 421331. n-rearfront A. (rear+1) MOD n=front B. rear=frontCrear+1=front D. (rear-l) MOD n=front 1999 16232. 2001 12A. B. C. D. 33. , ,
8、1,2,3,4 1,2,3,4 1999 15, : A. B. C. D. : A. B.C. D., : A. 3,2,1,4 B. 3,2,4,1 C. 4,2,3,1 D. 4,3,2,1 F. 1,2,3,4 G. 1,3,2,434. 1997 32A B. C. D. 35. SQe1e2e3e4,e5e6SQ6e2e4e3,e6,e5,e1S( )A 6 B. 4 C. 3 D. 2 2000 61.536. 1998 12A B C37. abcdefg, 2000 8Ad ecfbga B. fegdacbC. efdgbca D. cdbefag 1. 1998 22 1
9、998 222. 2000 213. 2000 214 1998 415. 1999 426. nCnCn=1/n+1*2n!/(n!)*(n!) 1998 327. 2001 3 18. 1,2,3,4,5,6,3,2,5,6,4,1. 1995 21 1997 319. 1999 (5)210123456154623 1999 3111. 19983112. 1998 4113. 1998 3114. 1997 5115. - 1998 216. - 1996 1117. - 2002 2 118. 19975(1)19. 20023(1)20. 1996 21 1999 21 1_-_-
10、 1997 32_ 1998 3 14. 123_20011(2)5. 1000H()12345-PUSH,PUSH,POP,PUSH,POP,PUSH,PUSH_H4 1998 146. stack(1,n)top1top21top1_2 top2_ 1997 136_ 1998 317_(1)_;_(2)_n_(3)_(4)_(5)_ 1994 158. _ 2001 729SX12341342SX_ 2000 510. data1.ntop,x_ 2001 2 21123+(12*3-2)/4+34*5/7)+108/9_ 1998 4112. -_ 2001 1 14/8130N-M1
11、-M=_PASCALC M= _CPASCAL 2000 714_ 2000 715. _ 2000 2216_ 2001 517. frx_ 2000 3218-_2001 2419-A1.MFRONTTAIL_ 1995 1120. -sq.data0:Msq.front-_sq.rear,_ 1997 4 (4)21_ 2000 1022-A0.m-1frontrear _ 2000 116%/323Q0.N-1-PRQ_ 1997 424 1998 2613/25+61 13, 25/61, +FUNC compute(a):real; a1.mBEGINsetnull(s)i:=1c
12、h:= (1)_WHILE ch DOBEGINCASE ch OF0.9: x:=0;WHILE ch,DOBEGINx:=x*10+ord(ch)-ord(0);i:=i+1ch:= (2)_;END+: x:=pop(s)+pop(s);-: x:=pop(s);x:=pop(s)-x;*: x:=pop(s)*pop(s);/: x:=pop(s);x:=pop(s)/x;ENDCASEpush(s,x)i:=i+1ch:=aiEND;comput:= (3)_END;25. OPTROPNDprecede(oper1oper2)operate(opnd1,oper,opnd2)# 1
13、999 2 (7)FUNCTION exp_reduced:operandtype;INITSTACK(OPTR);PUSH(OPTR#)INITSTACK(OPND);read(w)WHILE NOT(w=#) AND (GETTOP(OPTR)=#) DOIF NOT w in op THEN PUSH(OPND,w);ELSE CASE precede(GETTOP(OPTR),w)OF:(1)_; read(w);=:(2)_; read(w);:theta:=POP(OPTR);b:=POP(OPND);a:=POP(OPND);(3)_ENDC;RETURN(GETTOP(OPND
14、);ENDF;26_nw1,w2,w3,-,wnTnTFUNCTION kanp_stack(VAR stack,w:ARRAY1.n OF real; VAR top:integer; T:real):boolean;w1n nTtrue,falseBEGINtop:=0; i:=1; iWHILE (1)_ AND(2)_DOIF (3)_ OR (4)_ AND (in)THEN top := (5)_ ;stacktop :=i;iT:=T-wi;IF T=0 THEN RETURN (6)_) ELSE IF (i=n ) AND (top0)THEN i:=(7)_;top:= (8)_ T:= (9)_ ; Ti:=i+1 ;RETURN(10)_) END; 1996 10 1. 1999 12 1999 322. 1996 6 ( 1 )3. - 2001 23 1998 434. SXSXSXSX12 1992 105. 5 ABCDECDCD 2000 16. 1 2 3 4 5 6,:4 3 5 6 1 21 3 5 4 2 6; 1996 3 (3)7. ABCDEBCAEDDBACE 1998 28. a,b,c,d, 2001 429.