1.D 2。 B 3。 A 4。 A 5。 B
6.D 7。 C 8。 B 9。 C 10。 D
1 1.C 12。 C 13。 B 14。 D 15。 D
16.B 17。 D 18。 A 19。 C 20。 B
Second, problem solving: (***2 questions, 5 points for each blank, * * * 10)
1.70
2.5
Three, the reading program to write the results (***4 questions, 8 points for each question, 32 points * * *)
1 .4
2.4 16
3.782
4.NPOI
4. Improve the program (3 points for the first 8 spaces, 2 points for the last 2 spaces, and 28 points for * * *).
1.
① 0
② tmp+a[i]=ans or a[i]+tmp=ans or ans=a[i]+tmp, etc.
③& lt; 0
④ me
⑤ inc(tmp, a[i]) or tmp := tmp+a[i].
2.
① 0
② inc(hash[i, j]) or hash [I] [j]: = hash [I] [j]+1.
③ Work (x, y, tot+ 1)
④ dec(hash[i, j]) or hash [I] [j]: = hash [I] [j]-1.
⑤ Work (0,0,0)