One, the single choice question (altogether 15 questions, each question 1.5 points, a total of 22.5 points; each question has and only one correct option)

1. Which of the following is an object-oriented high-level language (). A. Assembly language B. C c. Fortran D. Basic

B

**The computer language is divided into high-level and low-level languages. And the high-level language is mainly relative to the assembly language**

**High-level languages are not specifically specific language, but include many programming languages, such as popular Java,c,c++,c#,pascal,python,lisp,prolog,foxpro, easy language**

The **low-level language is divided into machine language (binary language) and assembly language (symbolic language), both of which are machine-oriented languages and are closely related to the instruction system of specific machines. The machine language writes the program with the instruction code, while the symbolic language writes the program with the instruction mnemonic. **

2. The number of bytes represented by 1TB is (). A. 2 of the 10 square B. 2 of the 20 of the 2 for party C. 30

**D**

**1tb=2^10gb=2^20mb=2^30kb=2^40byte**

3. Binary numbers 00100100 and 00010101 of the and are (). A. 00101000 B. 001010100 C. 01000101 D. 00111001

**D**

**send the question =w=**

4. Which layer of protocol () the TCP protocol belongs to. A. Application layer B. Transport Layer C. Network layer D. Data Link Layer

**B**

**TCP (Transmission Control Protocol)**

5. Of the following 32-bit IP addresses, the written error is (). A. 162.105.136.27 B. 192.168.0.1 C. 256.256.129.1 D. 10.0.0.1

**C**

**IP Address 0~255**

6. In a freeform graph, the sum of the degrees of all vertices is () times the number of edges. A. 0.5 B. 1 C. 2 D. 4

**C**

**just draw a picture to see the line, the principle is because of the direction of the map, each point of the degree and = number of sides, each side 2 times**

7. For the length of N ordered single linked list, if the probability of retrieving each element is equal, then sequentially retrieved to any element of the table

The average retrieval length is (). A. N/2 B. (n+1)/2 C. (n-1)/2 D. N/4

**B**

**retrieve any element retrieve length T=1+2+3+4+5+6+......+n=n (n+1)/2**

**because the probability is equal, the result is t/n= (n+1)/2**

8. The main function of the compiler is ().

A. Translating a high-level language into another high-level language B. Translating the source program into an instruction

C. Translating low-level languages into high-level languages D. to regroup the source program

**B**

**This is actually a rule, however, who uses who knows =w=, estimated to have used all know =w=**

9. Binary number 111.101 corresponds to the decimal number is (). A. 5.625 B. 5.5

C. 6.125

D. 7.625

**D**

**the =w= of the system of transformation and delivery of the necessary questions**

** **

10. If there are variable var A:integer; x, Y:real;, and a: = 7,x: = 2.5,y: = 4.7, then

The value of the expression x + a mod 3 * trunc (x + y) mod 2 div 4 is approximately (). A. 2.500000 B. 2.750000

C. 3.500000

D. 0.000000

A

**operation priority problem:**

not

and ***/div mod**

**or XOR +-**

**same level on same line, from left to right**

11. With the following structure description and variable definition, as shown in the figure, the pointer p, Q, R point to a list of three connected

Continuation of the knot point. Type PTR = ^node;

node = record

Data:integer;

Next:ptr;

End

Var

P, Q, r:ptr;

Now you want to exchange the points between Q and R, and to keep the list continuous, the following section of the program is the wrong ().

A. Q^.next = R^.next; P^.next = R; R^.next = q; B. P^.next = R; Q^.next = R^.next; R^.next = q;

C. Q^.next = R^.next; R^.next = q; P^.next = R; D. r^.next = q; Q^.next = R^.next; P^.next = R;

**D**

**as long as the study of the linked list of water is good =. =**

12. Find the maximum and minimum values in the 2n number at the same time, at least the number of comparisons is ().

A. 3 (n-2)/2

B. 4n-2

C. 3n-2

D. 2n-2

**C**

**In fact, I was wrong, so the problem adults taught:**

The **first two numbers are compared, the large is the maximum, the small is the minimum value, and 1 times is used;**

**there is still 2* (n-1) number, each two comparison, large and maximum comparison, small second and minimum comparison, total is 3* (n-1) times**

**so add together is (3*n-2) times**

13. G is a complete graph with 6 nodes, and to get a spanning tree, you need to remove () the Edge from G. A. 6 B. 9

C. 10

D. 15

**C**

**each of the different vertices of a graph is connected by a single edge, which is called a complete graph.**

**a complete figure has n (n-1)/2 edges, the tree has (n-1) edge**

So **, the answer is out.**

**in fact, just draw a few more and then come out of the =w=**

** **

14. The following time complexity is not an O (N2) Sorting method is ().

A. Insert Sort

B. Merge sort

C. Bubble sort

D. Choosing a sort

**B, obviously**

**because of the high frequency, so here's a summary:**

15. The following program section implements the algorithm for finding the second small element. Input is an array of n unequal numbers, s, in the output s

The second small number secondmin. In the worst case, the algorithm needs to do () a comparison.

If S[1] < s[2] THEN BEGIN

Firstmin: = S[1]; Secondmin: = s[2]; End ELSE begin

Firstmin: = s[2]; Secondmin: = S[1]; End

For I: = 3 to n do

If s[i] < secondmin Then

If s[i] < firstmin Then

Begin

Secondmin: = Firstmin; Firstmin: = S[i];

End

Else

Secondmin: = S[i];

A. 2n

B. n-1

C. 2n-3

D. 2n-2

**C**

**The first two numbers are compared with 1 times, the remaining (n-2) number**

**The worst-case scenario is two times more than each.**

**so add up, get C** .

Second, the indefinite item choice question (altogether 5 questions, each question 1.5 points, a total of 7.5 points; each question has one or more correct options, more or less optional are not divided)

1. If the logical variable A, C is true, B, D is false, the following logical operational expressions are true ().

A. (b˅c˅d) ˅d˄a

B. ((¬a˄b) ˅c) ˄¬b

C. (a˄b) ˅ (c˄d˅¬a)

D. A˄ (d˅¬c) ˄b

**AB**

**logical operation, do not understand the meaning of each symbol directly ask Niang or turn my previous years Noip the first question of the blog =w=**

2. The** following () software belongs to the operating system software. A. Microsoft Word B. Windows XP C. Android D. Mac OS X E. Oracle**

**BCD**

**in fact, BC should be able to be covered, a is obviously not selected (text compiled software), as for the de posture is not enough words can only rely on character**

**Typical operating systems: Linux, Windows (XP), Android, Mac os x., IOS, WP, Chrome os**

**3. In the NOI contest, the answers to the program questions must not include the following (). A. Trying to access the network**

**B. Open or create a file other than the input/output file specified in the topic C. Run other programs**

**D. Changing the access rights of the file system E. Read and Write file System Management information**

**ABCDE**

**It's all a routine. =**

**4. Which of the following structures can be used to store graphs (). A. adjacency matrix B. Stack**

**C. adjacency table**

**D. Two fork Tree**

**AC**

It **should be fine to learn the picture =w=**

5.** in the following unsigned decimal integers, the number that can be represented by a eight-bit binary is (). **

A.** 296**

**B.**

**C. 256**

**D. 199**

**BD**

**eight-bit binary representation range [2^7,2^8] (left-right)**

** **

**Third,**

**1.102**

**to calculate or list all the circumstances. = (do not come up to choose the latter, consider the feelings of the brain mody =a=, you always do not have it appropriate)**

**2.20**

Have **learned the shortest path should be able to answer and can also test the play =. =**

**Four. **

**1.8 (is to find a multiple of 3 in [A,b] range)**

**2.20 (Write, guide, recursive)**

**Fun (3,1,6) =fun (2,2,6) +fun (2,3,6** ) +fun (2,4,6) +fun (2,5,6) +fun (2,6,6) +fun (2,7,6) =20

**Fun (2,2,6) =fun (1,3,6) +fun** (1,4,6) +fun (1,5,6) +fun (1,6,6) +f (1,7,6) =10

**Fun (2,3,6) =fun (1,4,6)** +fun (1,5,6) +fun (1,6,6) +fun (1,7,6) =6

**Fun (2,4,6) =fun (1,5,6)** +fun (1,6,6) +fun (1,7,6) =3

**Fun (2,5,6) =fun (1,6,6) +fun 1,7,6 (=1)**

**Fun (2,6,6): =fun (1,7,6) =0**

**Fun (1,3,6) =fun (0,4,6)** +fun (0,5,6) +fun (0,6,6) +fun (0,7,6) =4

**Fun (1,4,6) =fun (0,5,6)** +fun (0,6,6) +fun (0,7,6) =3

**Fun (1,5,6) =fun (0,6,6) +fun 0,6,7 (=2)**

**Fun (1,6,6) =fun (0,7,6) =1**

**Fun (1,7,6) =0**

** **

**3.2 5 6 3 4 7 1 (see that bubble sort should be about the same, that is, the output of individual characters in dictionary order after the position should be)**

**4.3 6 9 1 5 10 4 11 8 2 7 (Joseph ring problem, realized by the linked list, 11 people around a circle, starting from 1, numbered,**

**3 out of the exit, and then from the next person out of the 1, until all out, sequentially output the number of the outgoing person**

** **

**Five. **

**"Pascal answer."**

1.**(1) n (into stack 1)**

**(2) # 0**

**(3) STACK2[TOP2]:=STACK1[TOP1]; (out stack 1 into stack 2)**

**(4) STACK1[TOP1]:=STACK2[TOP2];(out stack 2 into stack 1)**

**(5) Top1-1**

**Note that understanding the meaning of Top1 and Top2 is the next position on the top of the stack, that is (top-1) is the top of the stack (pay attention to what is called the next position)**

**2**

**(1) [1,1]**

**(2) rowsum[i,0]:=0;**

**(3) rowsum[i,j-1]+matrix[i,j];**

**(4) area:=0;**

**(5) rowsum[i,last]-rowsum[i,first-1]**

The description of the **rowsum array is incorrect, and should be the number of J in the first line** ,

**Of course my personal approach has always been to prefix and do, but this problem is not the case**