1) We usually divide the stages of computers according to their main components, so the ENIAC manufactured in 1946 belongs to () computers.
A) second generation b) third generation c) fourth generation d) first generation
2) in the following computer equipment, as a storage device is ()
A) keyboard B) RAM C) monitor D) CPU
3) We generally call computers that can play VCD and CD discs, watch movies and listen to music "multimedia computers". Among the following hardware devices, multimedia computers must have ().
A) optical drive b) network card c) scanner d) printer
4) The computer has calculation function, so which of the following hardware devices is this "calculation" completed ()?
A) CPU B) ROM C) memory d) display card
5) The following is the computer operating system ()
a)Pascal B)Photoshop C)Word D)LINUX
6) The decimal number 1 1 corresponds to the binary number ().
a) 10 1 1 B) 1 100 C)00 1 1D) 10 10
7) In 7)pascal programming, integer types are used to store integers. Among the following integers, () can be saved correctly with an integer type variable.
32650 B) 40000 C) 60000 D) 50000
8) Through the Internet, we can use () to chat with distant friends in real time.
A) email b) Tencent QQ C) BBS D) FTP.
9) We can classify networks according to the size of their coverage areas. The following network categories are not classified according to the size of the network coverage area ()
A) WAN B) MAN C) Ethernet D) LAN
10) Of the following descriptions of computer viruses, the correct one is ().
A) If a person has a cold virus, the computer he uses may be infected with this person's virus and eventually develop into a computer virus.
B) If the environment around the computer is not good (dusty, etc. When the manufacturer assembles, the computer will have a computer virus.
C) A computer virus is essentially a computer program.
D) Computer viruses can only spread through computer networks.
1 1) In PASCAL programming, the result of the expression "32 DIV 5" is ().
A) 2 B) 7 C) 6.4 D) 6
12) In pascal programming, we can use the () statement to quit the loop.
A) repeat b) end c) interrupt d) continue.
13)pascal source program can be compiled to generate executable programs that can be directly executed under the operating system. The extension of these executable programs is ().
a)。 doc B)。 exe C)。 txt D)。 right of priority
14) Of the following descriptions of binary trees, the correct one is ().
A) A node may have no child nodes, or 1 child nodes, or 2 child nodes.
B) The root node can have three children; c) The root node can have four children.
D) Any node can have up to 4 child nodes.
15) Given that there are several numbers in a queue (as shown below), the last dequeue element is ().
12 B) 5 C) 9 D) 32
2. Problem solving: (5+5 = 10)
Each node of 1. binary tree has at most two child nodes, which are divided into left and right nodes (the order cannot be reversed). Now there are three nodes A, B and C to form a binary tree. Now it is stipulated that the root node must be A and B is the left son of A. Q: How many different forms of binary trees meet the above conditions? (Just write down the quantity)
2. New Tian Ji Horse Racing. Tian Ji has three horses (running speeds are 40, 60 and 90 respectively), Wang Qi has three horses (running speeds are 50, 70 and 100 respectively), and Tian Ji's horses compete in pairs with Wang Qi's horses. Because the order of each appearance was decided by Tian Ji, Tian Ji won the final victory (one more than Wang Qi) through clever strategy. The specific forms of confrontation are as follows (according to Tian Ji)
40- 100 60-50 90-70
At present, there are eight horses in Tian Ji (the speeds are 10, 20, 30, 40, 50, 60, 70 and 80 respectively) and eight horses in Wang Qi (the speeds are 35, 48, 56, 65, 77, 98, 105 and 65438 respectively). If the answer is "Yes", please write down the form of fighting between two horses in Tian Ji's winning games (the format is modeled after the previous example and written according to the speed of Tian Ji horses from childhood to adulthood).
3. Look at the program and write the running result (7+7+8+8 = 30 points. ):
1. program test01;
defined variable
X, y, s, p: integer;
begin
readln(x,y);
s:= x+y; p:= x-y;
If x<y, then p: = y-x;
s:= s-p;
Writing content;
End.
Input:
13 3 1
Output:
2. Program test 02;
defined variable
I, j, k, t: integer;
A: Integer of array [1..7];
begin
For i:= 1 to 7, make an [I]: = 0;
For i:= 1 to 4, make an [I]: = I;
t:= a[7];
For i:=7 downto 2 do a [I]: = A [I-1];
a[ 1]:= t;
Write for i:= 1 to 7 (a [I]);
End.
Output:
3. Program test 03;
defined variable
N, c, I, j, t, temp: integer;
A: Integer of array [1..50];
begin
readln(n);
Read (a [I]) for i:= 1 to n;
For i:= 1 to n- 1 do.
begin
c:= a[I]; t:= I;
for j:= I+ 1 to n do if c & lt; A[j] and then start t: = j; c:= a[j]; End;
If t<& gt then I start temp: = a [I]; a[I]:= a[t]; a[t]:= temp; End;
End;
Write for i:= 1 to n (a[i],'');
End.
Input:
18
90 12 33 44 77 29 8 3 4 6 2 1 2 1 24 23 54 53 25
Output:
4. Program test 04;
defined variable
I, j, s, h, v, n: integer;
A: Integers of the array [1..20, 1..20];
begin
readln(n,h,v);
For i:= 1 to n do
begin
Read(a[i, j]) for j:= 1 to n; readln
End;
s:= 0;
For i:= 1 to n do
If i=h, then for j:= 1 to n do s:=s+a[i, j];
For j:= 1 to n do
If j=v, for i:= 1 to n do s:=s+a[i, j];
If h & lt=v, then
for I:= 1 to n-(v-h)do s:= s+a[I,i+v-h]
else for j:= 1 to n-(h-v)do s:= s+a[j+h-v,j];
For i:= 1 to 2 do s:=s-a[h, v];
Writing content;
End.
Input:
8 5 3
2 16 18 5 13 13 14 0
3 15 19 14 12 16 5 1 1
9 1 5 6 1 14 7 5
1 2 6 5 2 12 4 8
3 13 10 1 10 1 12 18
1 5 0 1 4 6 18 0
19 15 7 4 0 2 12 13
8 15 17 0 2 1 1 16 16
Output:
4. Improve the program (according to the requirements of the problem and the existing program, fill in appropriate sentences or symbols in the blank to make the program complete. This question ***30 points. )
1. Tourist food (3+3+3 = 12 points)
On New Year's Day, Hongqi Primary School will organize primary school students to travel. Bingbing's mother gave Bingbing 100 yuan. In order to ensure nutrition, she asked Bingbing to buy N kinds of food (milk, apples, mineral water, candied fruit, eggs, bread, etc.). ) to serve as Chinese food and snacks (if a[ 1] and a[2] are used to save the prices of n kinds of food, ... is one [n] respectively). A [1]+A [2]+A [3]+...+A [n]), and the rest of the money is at the discretion of the soldiers.
Bingbing is a very enthusiastic student. He wants to spend all the remaining money on the cheapest of these foods, and then he plans to share it with other students.
For example, now that my mother gives money to Bingbing 20 yuan, she wants to buy a portion of mineral water, candied fruit, milk, eggs, apples and everything in bread (the prices are 1, 1, 3, 2, 1 and 4 yuan respectively), then the remaining money of Bingbing is 20-650. Bingbing will spend all the remaining 8 yuan on mineral water, apples or candied fruit (the lowest price of everything is 1 yuan), and * * * can buy 8 copies of the cheapest. In this way, with the six servings of food that Bing Bing originally bought and intended for Chinese food and snacks, he has *** 14 servings of food.
In the following process, firstly, input the number of foods that Bingbing used as Chinese food and snacks and the total number of shares that Bingbing's mother gave to Bingbing (represented by n and s, where s must be less than 100), then input the price of each food, and finally output the total number of shares of all foods that Bingbing owns. For the previous example, examples of input and output are as follows:
Sample value input
6 20
1 1 3 2 1 4
Sampling output
14
Please improve the following procedures:
Program test 05;
defined variable
N, I, j, tot, min, s: integer;
A: Integer of array [1..50];
begin
readln(n,s);
For i:= 1 to n do begin read (a [I]); s:= s-①; End;
min:= 32720;
for I:= 1 to n do if min & gt; a[I]then min:=②;
tot:= n;
while min & lt=s do
begin
tot:=③; s:= s-min;
End;
writeln(④);
End.
2. Checkers (3+3+3+3 =18 points)
Checkers is a well-known chess activity, that is, one chess piece can jump directly to the empty space adjacent to another chess piece through another adjacent chess piece. In a long string of numbers, if a number k is equal to the number k after the k bit, it is called checkers.
For example, for the character string 13 13 13, if k is specified as 1, then three 1 constitute the number of checkers, and at most two steps can be skipped from the first 1; Starting from the second digit 3 of k, it also constitutes the number of checkers, and you can skip at most 2 steps. Another example is1223122312341223. If k is specified as 2, the maximum number of steps that can be skipped in checkers is 3 (the destination reached by each step is underlined with "_ _"). That is to say, if K is specified, then the value as a "chess piece" is K, and every "checkers" will skip the adjacent K positions on the right.
The following program first inputs the value of k from the keyboard, then inputs a string composed of numbers (including only the numbers 0, 1, …, 9), and stipulates that the length of this string must be a multiple of 2 * k. After processing, the program can finally output two integers, which respectively represent the number of squares and steps that can be skipped at most from the value of the first k in the string and the value of the second k in the string. Please perfect the procedure.
Knowledge link
1.t:string defines a string type variable, and S can store a string. Each string can be stored in the corresponding variables s[ 1], s[2], ... and can store up to 255 characters.
2.t 1:=copy(s, i, k) Copy () is a system function, which is used to copy the string saved in the string variable s from the ith position, and then return the copied string (in this statement, it is assigned to the variable t 1.
3.val (t 1, a[i 1], e) in Val () is a systematic process, which can convert the string of numbers stored in t1into corresponding numerical values (the generated numerical values can be operated by four operations), and then save the numerical values to the subscript variable A [I/kloc]. For example, if the value of t 1 is the string "2", then the value of a[i 1] after calling val () is the value of 2.
4.length(s) is a system function, which is used to calculate and return the length (number of characters) of the string saved in the string variable S.
Sample value input
three
123234 123234 123235 123234
Sampling output
3 1
Program test 06;
const maxn = 200
defined variable
X 1, x2, I, j, k, n: integer;
A: Integer of array [1.. 100];
Integer of array [1.. 100];
S: string;
Program check (k: integer);
defined variable
I, j, i 1, j 1, e: integer;
T 1, t2: string;
begin
I:= 1; I 1:=①; j 1:= 0; x 1:=②; x2:= 0;
And I+2 * k-1<; =n do
begin
t 1:=copy(s,I,k); I 1:= I 1+ 1; val(t 1,a[i 1],e); I:= I+k;
t2:=copy(s,I,k); j 1:= j 1+ 1; val(t2,b[j 1],e); I:= I+k;
End;
I:= 1;
What do while (③) and (i<i 1) do?
begin x 1:=④; I:= I+ 1; End;
j:= 1;
What do while (⑤) and (j<j 1) do?
begin x2:=⑥; j:= j+ 1; End;
End;
Start {main}
readln(k);
readln(s); N:= length (s);
Check (k);
writeln(x 1,' ',x2);
End.