Current location - Education and Training Encyclopedia - University rankings - Informatics related problems
Informatics related problems
Ha ha laugh .. Landlord, I also have a game tomorrow!

Examination questions of preliminary contest in the 10th National Informatics Olympic Competition.

(improve the Pascal language of the group for two hours)

●●●● The answers to all questions are required to be written on the answer sheet, which is invalid ●●

A, multiple-choice questions (* * 10 questions, each question 1.5 points, * * 15 points. Every question has one and only one correct answer.

1. Let the complete set I = {a, b, c, d, e, f, g}, set A = {a, b, c}, B = {b, d, e}, C = {e, f, g}, then the set is ().

A.{a,b,c,d} B. {a,b,d,e} C. {b,c,d,e} E. {d,f,g}

2. There are () * * substrings "abc" in all strings composed of 3 A, 5 B and 2 C.

A.40320 B. 39600 C. 840 D. 780 E. 60

A station is long and narrow, the width can only accommodate one car, and there is only one entrance and exit. It is known that the station status is empty at a certain moment, and the entry and exit records from that moment are "entry, exit, entry, exit, entry, exit, entry, exit, entry, exit, exit". Assuming that the sequence of vehicles entering the station is 1, 2, 3, ..., then the sequence of vehicles leaving the station is ().

A. 1,2,3,4,5 B. 1,2,4,5,7 C. 1,3,5,4,6 D. 1,3,5,6,7 E. 1,3,6,5,7

4. If the number of leaf nodes of a complete binary tree is n, the total number of nodes is ().

A.N b . 2 * N c . 2 * N– 1d . 2 * N+ 1 e . 2N– 1

5. Binary tree T, its preorder traversal sequence is 1 2 4 3 5 7 6, its middle traversal sequence is 4 2 1 5 7 3 6, so its postorder traversal sequence is ().

A.4 2 5 7 6 3 1 b . 4 2 7 5 6 3 1 c . 4 2 7 5 3 6 1d . 4 7 2 3 5 6 1 e . 4 5 2 6 3 7 1

6. Decimal number 100.625 is equivalent to binary number ().

A. 100 1 100. 10 1 b . 1 100. 10 1 c . 1 10 10 100.0 100.0 165438

7. Which of the following components is not necessary for the normal operation of a personal desktop computer ()?

A. CPU B. Graphics card (graphics card) C. Optical drive D. Motherboard E. Memory

8. Which of the following abbreviations commonly used on the Internet is wrong ().

A. World Wide Web

B. Uniform resource locator

C. hypertext transfer protocol

D. fast transfer protocol

E. transmission control protocol.

9. What kind of output device works when toner is transferred to paper by electrostatic adsorption ()?

A. stylus printer B. inkjet printer C. laser printer D. pen plotter E. inkjet plotter

10. If a computer wants to use a telephone line to surf the Internet, it must be equipped with equipment that can convert digital signals and analog signals. The device is ().

A. Modem B. Router C. Network Card D. Gateway E. Bridge

Second, the indefinite multiple-choice questions (* * 10 questions, each question 1.5 points, * * * 15 points. If you choose more than one, you will not score).

1 1. Hungarian American mathematician Feng? Neumann's contribution to the development of computer science includes ().

A put forward the mathematical model of ideal computer, which became the theoretical basis of computer science.

B puts forward the working principle of stored program, which has a far-reaching impact on the development of modern electronic computers.

C. Design the first computer EDVAC with the function of storing programs.

D. adopt integrated circuits as the main functional components of the computer.

E. It is pointed out that computer performance will double every two years.

12. Which of the following is a 64-bit processor ()?

A. Intel An Teng B. Intel Pentium III C. AMD Athlon64

D.AMD haolong E. IBM Power 5

13. (2004)10+(32)16 results in ().

A.(2036) 16 b .(2054) 10 c .(4006)8d .( 10000000 1 10)2 e .(2036) 10

14. Which of the following is not the name of database software ()?

A.MySQL b . SQL Server c . Oracle d . Outlook e . Foxpro

15. Which of the following is not a computer storage device ()?

A. file manager B. memory C. graphics card D. hard disk E. U disk

16. Which of the following software belongs to operating system software ()?

A. Microsoft Word B. Windows XP C. Foxmail D. King Player E. Red Hat Linux

17. The following statement is true ().

A. the basic function of A.CPU is to execute instructions.

B.CPU frequency refers to the number of instruction cycles completed in 1 sec. B. CPU. The faster the main frequency, the faster the CPU speed.

C. CPUs with different internal structures running the same machine language program will of course produce different results.

In a computer, a memory address code corresponds to a unique memory unit.

The width of e data bus determines the amount of data transmitted at one time, which is one of the factors that affect the performance of computer.

18. What are the three colors mixed in the color display ()?

A. red b white c blue d green e orange

19. Which of the following programming languages supports the object-oriented programming method ()?

A.c++ b . Object Pascal C . C d . small talk e . Java

20. The compulsory courses and prerequisite courses for computer majors in universities are shown in the following table:

Course code C0 C 1 C2 C3 C4 C5 C6 C7

Course Name Advanced Mathematics Programming Language Discrete Mathematics Data Structure Compilation Technology Operating System Principles General Physics Computer

Prerequisite courses C0, C 1C 1, C2C3C3, C7 C0C6

Please judge which of the following course arrangements is reasonable ().

A.C0,C 1,C2,C3,C4,C5,C6,C7 B,C0,C 1,C2,C3,C4,C6,C7,C5

C.C0,C 1,C6,C7,C2,C3,C4,C5 D. C0,C 1,C6,C7,C5,C2,C3,C4

E.C0,C 1,C2,C3,C6,C7,C5,C4

Three. Problem solving (***2 questions, 5 points for each question, * * * 10)

1.75 children went to the playground to play. They can take a merry-go-round, a sliding railway and a spaceship. It is known that 20 of them have played these three things, and 55 have played at least two of them. If the cost of each ride is 5 yuan, and the total income of the amusement park is 700, you know that no child has ever played.

2. Among the seven people called A, B, C, D, E, F and G, A can speak English; B can speak English and Chinese; C can speak English, Italian and Russian; D can speak Chinese and Japanese; E can speak Italian and German; F can speak Russian, Japanese and French; G can speak German and French. Can you arrange their seats at the round table so that everyone can talk to the people around them? If you can, please write down your arrangement plan starting with "a b".

Four. Reading procedure (***4 questions, 8 points for each question, * * * 32 points)

1 . program program 1;

defined variable

U: an integer of array [0 .. 3];

A, b, c, x, y, z: integer;

begin

read(u[0],u[ 1],u[2],u[3]);

a:= u[0]+u[ 1]+u[2]+u[3]-5;

b:= u[0]*(u[ 1]-u[2]div u[3]+8);

c:= u[0]* u[ 1]div u[2]* u[3];

x:=(a+b+2)* 3-u[(c+3)mod 4];

y:=(c * 100- 13)div a div(u[b mod 3]* 5);

If ((x+y) mod 2 = 0), then z: = (a+b+c+x+y) div 2;

z:=(a+b+c–x-y)* 2;

writeln(x+y-z);

End.

Input: 2 5 7 4

Output:.

2. Program program2

defined variable

I, number, ndata, sum: integer;

Data: integer of array [1.. 100];

Program solution (s, symbol, n: integer);

Var i: integer;

begin

Because i := s to ndata really started.

inc(sum,sign *(number div(n * data[I]));

solve(i + 1,-sign,n * data[I]);

End;

End;

begin

Read (number, ndata);

sum:= 0;

For i := 1 to ndata do read (data [I]);

Solve (1, 1,1);

writeln(sum);

End.

Input:1000351311.

Output:.

3. Program design;

Var c: array[ 1..3] string [200];

S: an integer of the array [1.. 10];

M, n, I: integer;

Numara program;

var cod:boolean;

I, j, nr: integer;

begin

Start with j := 1 to n.

NR:= 0; cod:= true;

For i := 1 to m do

If c[i, j] =' 1', then start.

If it's not cod, then start.

cod:= true; Inc(s[NR]); NR:= 0;

end

end

Otherwise start.

If cod then starts

NR:= 1; cod:= false;

end

Else company (NR);

End;

If it is not cod, then Inc (S [NR]);

End;

End;

begin

readln(m,n);

For i := 1 to m do readln (c [I]);

Numara;

For i := 1 to m do

If s [I] <; & gt0 then write (i,'', s[i],'');

End.

Input:

3 10

1 1 10000 1 1 1

1 10000 1 1 1 1

10000000 1 1

Output:.

4. Programming program 4;

constant

u: array[0..2] of integer = ( 1,-3,2);

V: array [0 ... integer = (-2,3)1];

defined variable

I, n, sum: integer;

Function g(n: integer): integer;

Var i, sum: integer;

begin

sum:= 0;

for i := 1 to n do inc(sum,u[I mod 3]* I);

g:= sum;

End;

begin

sum:= 0;

Read as (n);

for i := 1 to n do inc(sum,v[I mod 2]* g(I));

writeln(sum);

End.

Input: 103

Output:.

Verb (abbreviation of verb) improves the program (2 points for the first 5 spaces, 3 points for the last 6 spaces, and * * * 28 points).

1. Yue Se

Title description:

Josephus problem described it this way: There are n people sitting around a round table, and these n people are numbered 1 …, n in turn. Count off from the person with the number 1, count to the m th, then count off from the next person who dequeues, count to the m th and then dequeue, …, and so on until everyone dequeues. For example, when n=6 and m=5, the order of dequeuing is 5, 4, 6, 2, 3, 1.

The question now is: suppose there are k good people and k bad people. The number of good people is 1 to k, and the number of bad people is k+ 1 to 2K. We hope to find the minimum value of m, so that the top k people are all bad people.

Input:

The only number is k (0

Output:

The minimum value of m that makes the top k people in the queue all bad.

Input sample:

four

Output sample:

30

Procedure:

Program1;

defined variable

I,k,m,start:longint;

find:boolean;

Function check (remaining: integer): Boolean;

Var result: integer;

begin

Results: = (1) MOD surplus;

If (2) then start

Start: = result; check:= true;

end

Else check: = false

End;

begin

find:= false;

Read (k);

m:= k;

When (3) begins

find:= true; Start: = 0;

For i := 0 to k- 1 do.

If (uncheck (④)), start.

find:= false; Break;

End;

Inc(m);

End;

writeln(⑤);

End.

2. Logic game

Title description:

A classmate gave me a logic game. He gave me a chart of 1, which marked every boundary. My task is to draw a continuous curve in the diagram, so that the curve passes through each boundary once and only once, and the starting point and ending point of the curve are outside the whole area. This curve is allowed to self-cross.

For graph 1, my classmate told me that it is impossible to draw such a curve (Figure 2), but it is feasible to draw such a curve for some graphs (such as Figure 3). For a given graph, I wonder if I can draw a curve that meets the requirements.

Figure 1 Figure 2

Figure 3 Figure 4

Input:

The input graph is represented by an n×n matrix. Each cell of the matrix has an integer between 0 and 255, inclusive. The number of cells in the same area is the same, but the number of adjacent areas is different (but the number of non-adjacent areas may be the same).

The first line entered is n (0

Output:

When you can draw a curve that matches the meaning of the question, output "yes"; Otherwise, output "No".

Input sample:

three

1 1 2

1 2 2

1 1 2

Output sample:

be

Procedure:

Program program2

constant

D: array [0.7] of integer = (1, 0,-1, 0,0,1,①);

defined variable

Orig, n, I, j, ns: integer;

A: an integer of the array [0 ..101,0 ..10/];

Bun: Boolean type;

Process plimba(x, y: integer);

Var i, x 1, y 1: integer;

begin

a[x,y] := -a[x,y];

if (abs(a[x - 1,y])& lt; ②& lt;orig) and ((② <; & gta[x - 1,y])

Or (abs(a[x, y-1]) <; & gtorig))then Inc(ns);

if (abs(a[x + 1,y])& lt; & gtorig) and ((a[x+1, y-1] < & gta[x + 1,y])

Or (abs(a[x, y-1]) <; & gtorig))then Inc(ns);

if (abs(a[x,y- 1])& lt; ③& lt;orig) and ((③ < & gta[x,y - 1])

Or (abs(a[x-1, y]) <; & gtorig))then Inc(ns);

if (abs(a[x,y+ 1])& lt; & gtorig) and ((a[x-1, y+1] < & gta[x,y + 1])

Or (abs(a[x-1, y]) <; & gtorig))then Inc(ns);

Because i := 0 to 3.

x 1:= x+d[2 * I]; y 1:= y+④;

if(x 1 & gt; = 1) and (x1< = n) and (y1> = 1) and (y1< = n) and

(5) Then plimba(x 1, y1);

End;

End;

begin

bun:= true;

Read as (n);

For i := 0 to n+ 1 do.

For j := 0 to n+ 1 do a[i, j]: = 0;

a[0,0]:=- 1; a[n + 1,0]:=- 1;

a[0,n+ 1]:=- 1; a[n + 1,n+ 1]:=- 1;

For i := 1 to n do

Read(a[i, j]) for j := 1 to n;

For i := 1 to n do

For j := 1 to n do

If a[i, j] >; -1 and then start

ns:= 0; ⑥ ;

plimba(i,j);

If ns mod 2 = 1, then bun:= false;;

End;

if bun then writeln(' YES ');

If it is not bun, then writeln ('No');

End.

Name of the school in the competition area

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Examination questions of the 9th National Informatics Olympic Competition.

Perfect the answer sheet

Reading and recording

The chief reviewer always gets points.

The first question is graded, and the third question is graded.

The title 1234556789 10 scored the fourth largest question.

Score 1) 2) 3) 4)

The second question is scored, and the fifth question is scored.

Title:112131415171819 20 (/kloc)

score

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Answer sheet part

1. Multiple choice questions (* * 10 questions, each question 1.5 points, * * 15 points. Every question has one and only one correct answer.

The title is 1 23455 6789 10.

choose

2. Indefinite choice questions (* * 10 questions, each question 1.5 points, * *15 points. If you choose more than one, you will not score).

The title is11213141516171819 20.

choose

Three. Problem solving (***2 questions, 5 points for each question, * * * 10)

1. A:

2. a:

Four. Reading procedure (***4 questions, 8 points for each question, * * * 32 points)

(1) The running result of the program is:

(2) The running result of the program is:

Name of the school in the competition area

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Four. Reading procedure (***4 questions, 8 points for each question, * * * 32 points)

(3) The running result of the program is:

(4) The running result of the program is:

Verb (abbreviation of verb) improves the program (2 points for the first 5 spaces, 3 points for the last 6 spaces, and * * * 28 points).

pascal

=================

1.

( 1) ________________________________

(2) ________________________________

(3) ________________________________

(4) ________________________________

(5) ________________________________

2.

( 1) ________________________________

(2) ________________________________

(3) ________________________________

(4)________________________________

(5)________________________________

(6) ________________________________

Examination questions of the 9th National Informatics Olympic Competition.

Improve group reference answers

1. Multiple choice questions (* * 10 questions, each question 1.5 points, * * 15 points. Every question has one and only one correct answer.

The title is 1 23455 6789 10.

Select a d e c b b c d c a

2. Indefinite choice questions (* * 10 questions, each question 1.5 points, * *15 points. If you choose more than one, you will not score).

The title is11213141516171819 20.

Select BCACDE BCD D D AC BEADE ACD ABEBCE.

Three. Problem solving (***2 questions, 5 points for each question, * * * 10)

1. A: 10

2. A: a b d f g e c

Four. Reading procedure (***4 questions, 8 points for each question, * * * 32 points)

The running result of (1) program is: 263

(2) The running result of the program is: 328.

(3) The running result of the program is: 1 4 2 1 3 3.

(4) The running result of the program is -400.

Verb (abbreviation of verb) improves the program (2 points for the first 5 spaces, 3 points for the last 6 spaces, and * * * 28 points).

pascal

=================

1.

(1) Start +m- 1

(2) Results & gt=k (or k

(3) Not found (or found = false)

(4) 2*k-i

(5) m- 1

2.

( 1) 0,- 1

(2) a [x- 1, y- 1]

(3) a [x- 1, y- 1]

(4) d[2*i+ 1]

(5) a[x 1, y 1]=orig (or orig=a[x 1, y 1])

(6) orig:=a[i,j]

There is only 1 set here. Please look for something else online.