15.05.2022

Demo version of the exam in computer science. Exam procedure


USE 2018. Informatics. Typical test tasks. 14 options for tasks.

M.: 2018. - 280 p.

The author of the tasks is a leading specialist who is directly involved in the development of control measuring materials for the exam. Typical test tasks in computer science contain 14 options for sets of tasks, compiled taking into account all the features and requirements of the Unified State Exam in 2018. The purpose of the manual is to provide readers with information about the structure and content of KIM 2018 in computer science, the degree of difficulty of tasks. The collection provides answers to all test options, provides solutions to all tasks of one of the options, as well as solving problems of part 2. The manual is intended for teachers to prepare students for the computer science exam, as well as for high school students for self-training and self-control.

Format: pdf

The size: 5.8 MB

Watch, download:drive.google

CONTENT
Preface 5
Unified state exam in informatics and ICT 6
Work instructions 6
Option 1 10
Part 1 10
Part 2 21
Option 2 25
Part 1 25
Part 2 36
Option 3 41
Part 1 41
Part 2 49
Option 4 51
Part 1 51
Part 2 59
Option 5 63
Part 1 63
Part 2 69
Option 6 72
Part 1 72
Part 2 79
Option 7 82
Part 1 82
Part 2 93
Variant 97
Part 1 97
Part 2 108
Option 9 113
Part 1 113
Part 2 124
Option 10 129
Part 1 129
Part 2 139
Option 11 143
Part 1 143
Part 2 154
Option 12 159
Part 1 159
Part 2 170
Option 13 175
Part 1 175
Part 2 186
Option 14 191
Part 1 191
Part 2 202
Option 1 solutions 207
Part 1 207
Part 2 216
Answers to the tasks of part 1 221
Solving tasks of part 2 222
Option 2 222
Option 3 227
Option 4 230
Option 5 234
Option 6 237
Option 7 241
Option 8 245
Option 9 248
Option 10 253
Option 11 258
Option 12 263
Option 13 268
Option 14 274

The examination paper in informatics and ICT consists of two parts. There are 23 tasks in the first part. All of them require a short answer: in task No. 2 - a string of characters, in other tasks - an unsigned integer. Checking the answers to the tasks of part 1 is performed automatically: the examiner's answer is compared with the reference answer.
The tasks in the variant are arranged in increasing complexity, so it is recommended to complete them in a row, one after the other. If you find it difficult, you can skip the task and return to it after completing all the tasks that you managed to solve at once.
Approximately 90 minutes are allotted to complete the first part of the exam. In the conditions of a real exam, which lasts 3 hours 55 minutes, you can spend more time on solving the tasks of part 1, but it should be understood that in this case there may not be time left to solve the tasks of part 2. Under the conditions of training to solve the USE options, it is recommended to take for solving the tasks of part 1 a double lesson, that is, 90 minutes of pure time.

SPECIFICATION
control measuring materials
unified state exam 2018
in Informatics and ICT

1. Appointment of KIM USE

The Unified State Examination (hereinafter referred to as the USE) is a form of objective assessment of the quality of training of persons who have mastered the educational programs of secondary general education, using tasks in a standardized form (control measuring materials).

The USE is conducted in accordance with Federal Law No. 273-FZ of December 29, 2012 “On Education in the Russian Federation”.

Control measuring materials allow to establish the level of development by graduates of the Federal component of the state standard of secondary (complete) general education in informatics and ICT, basic and profile levels.

The results of the unified state exam in informatics and ICT are recognized by educational institutions of secondary vocational education and educational institutions of higher professional education as the results of entrance examinations in informatics and ICT.

2. Documents defining the content of KIM USE

3. Approaches to the selection of content, the development of the structure of the KIM USE

The content of the tasks is developed on the main topics of the informatics and ICT course, combined into the following thematic blocks: "Information and its coding", "Modeling and computer experiment", "Number systems", "Logic and algorithms", "Elements of the theory of algorithms", "Programming ”, “Architecture of computers and computer networks”, “Processing of numerical information”, “Technologies for searching and storing information”.
The content of the examination paper covers the main content of the informatics and ICT course, its most important topics, the most significant material in them, which is unambiguously interpreted in most versions of the informatics and ICT course taught at school.

The work contains both tasks of the basic level of complexity, testing the knowledge and skills provided for by the standard of the basic level, and
and tasks of increased and high levels of complexity, testing the knowledge and skills provided for by the profile level standard. The number of tasks in the KIM variant should, on the one hand, provide a comprehensive assessment of the knowledge and skills of graduates acquired over the entire period of study in the subject, and, on the other hand, meet the criteria for complexity, stability of results, and reliability of measurement. For this purpose, two types of tasks are used in KIM: with a short answer and a detailed answer. The structure of the examination work provides an optimal balance of tasks of different types and varieties, three levels of complexity, testing knowledge and skills at three different levels: reproduction, application in a standard situation, application in a new situation. The content of the examination paper reflects a significant part of the content of the subject. All this ensures the validity of the test results and the reliability of the measurement.

4. The structure of KIM USE

Each version of the examination paper consists of two parts and includes 27 tasks that differ in form and level of complexity.

Part 1 contains 23 short answer tasks.

In the examination paper, the following types of tasks with a short answer are proposed:

  • tasks for choosing and recording one or more correct answers from the proposed list of answers;
  • tasks for calculating a certain value;
  • tasks to establish the correct sequence, presented as a string of characters according to a certain algorithm.

The answer to the tasks of part 1 is given by the corresponding entry in the form of a natural number or a sequence of characters (letters and numbers), written without spaces and other separators.

Part 2 contains 4 tasks with a detailed answer.

Part 1 contains 23 tasks of basic, advanced and high difficulty levels. This part contains tasks with a short answer, implying independent formulation and recording of the answer in the form of a number or sequence of characters. Tasks check the material of all thematic blocks. In part 1, 12 tasks belong to the basic level, 10 tasks to an increased level of complexity, 1 task to a high level of complexity.

Part 2 contains 4 tasks, the first of which is of an increased level of complexity, the remaining 3 tasks are of a high level of complexity. The tasks of this part involve writing a detailed answer in an arbitrary form.

Every year, demo versions of the USE of the current year are published on the official website of FIPI.

On August 21, 2017, draft documents regulating the structure and content of the KIM USE in 2018 were presented (including the demo version of the USE in informatics).

There are documents that regulate the structure and content of KIM - a codifier and a specification.

USE in Informatics 2018 - demo with answers and criteria from FIPI

Demo version of the Unified State Examination 2018 in Informatics Download demo 2018
Specification demo variant informatika ege
Codifier codifier

Total tasks - 27; of them by type of tasks: with a short answer - 23; with a detailed answer - 4; by difficulty level: B - 12, P - 11, C - 4.

The maximum primary score for a job is 35.

The total time to complete the work is 235 minutes.

Changes in KIM USE 2018 in computer science compared to KIM 2017

There are no changes in the CIM structure.

In task 25, the possibility of writing an algorithm in natural language was removed due to the lack of demand for this possibility by the exam participants.

Examples of program texts and their fragments in the conditions of tasks 8, 11, 19, 20, 21, 24, 25 in the C language are replaced with examples in the C ++ language, as it is much more relevant and common.

Structure of KIM USE 2018 in Informatics

Each version of the examination paper consists of two parts and includes 27 tasks that differ in form and level of complexity.

Part 1 contains 23 short answer tasks. In the examination paper, the following types of tasks with a short answer are proposed:

- tasks for the calculation of a certain value;

- tasks to establish the correct sequence, presented as a string of characters according to a certain algorithm.

The answer to the tasks of part 1 is given by the corresponding entry in the form of a natural number or a sequence of characters (letters or numbers) written without spaces and other separators.

Part 2 contains 4 tasks with a detailed answer.

Part 1 contains 23 tasks of basic, advanced and high difficulty levels. This part contains tasks with a short answer, implying independent formulation and recording of the answer in the form of a number or sequence of characters. Tasks check the material of all thematic blocks.

In part 1, 12 tasks are related to the basic level, 10 tasks - to an increased level of complexity, 1 task - to a high level of complexity.

Part 2 contains 4 tasks, the first of which is of an increased level of complexity, the remaining 3 tasks are of a high level of complexity. The tasks of this part involve writing a detailed answer in an arbitrary form. The tasks of part 2 are aimed at testing the formation of the most important skills for recording and analyzing algorithms. These skills are tested at advanced and high difficulty levels. Also, at a high level of complexity, skills on the topic "Programming Technology" are checked.

The author of the tasks is a leading specialist who is directly involved in the development of control measuring materials for the exam.
Typical test tasks in computer science contain 14 options for sets of tasks, compiled taking into account all the features and requirements of the Unified State Exam in 2018. The purpose of the manual is to provide readers with information about the structure and content of KIM 2018 in computer science, the degree of difficulty of tasks. The collection provides answers to all test options, provides solutions to all tasks of one of the options, as well as solving problems of part 2. The manual is intended for teachers to prepare students for the computer science exam, as well as for high school students for self-training and self-control. By order No. 699 of the Ministry of Education and Science of the Russian Federation, textbooks published by the Exam publishing house are approved for use in educational institutions.

Examples.
To encode a certain sequence consisting of the letters A, B, C, D, E, F, we decided to use a non-uniform binary code that satisfies the Fano condition. For the letters A, B, C, D, the code words 100, 101, 00, 01 were used, respectively. For the remaining two letters, E and F, the lengths are unknown.
Specify the shortest possible code word for the letter F, under which the code will allow unambiguous decoding. If there are several such codes, indicate the code with the smallest numerical value.
Note. The Fano condition means that no code word is the beginning of another code word. This enables unambiguous decryption of encoded messages.

The machine receives a three-digit number as input. Based on this number, a new number is constructed according to the following rules.
1. The first and second, as well as the second and third digits of the original number are added.
2. The resulting two numbers are written one after the other in non-increasing order (without separators).
Example. Initial number: 348. Sums: 3 + 4 = 7; 4 + 8 = 12. Result: 127.
Specify the smallest number, as a result of which the machine will return the number 91.

The musical fragment was recorded in mono format, digitized and saved as a file without using data compression. The size of the resulting file is 24 MB. Then the same piece of music was re-recorded in stereo (two-channel recording) and digitized with a resolution 2 times higher and a sampling rate 3 times lower than the first time. Data compression was not performed. Specify the size of the file in MB resulting from the rewrite. In the answer, write down only an integer, you do not need to write a unit of measure.

Igor makes a table of code words for message transmission, each message has its own code word. Igor uses four-letter words as code words, in which there are only letters "M", "I", "R", and the letter "M" appears exactly 1 time. Each of the other valid letters may occur any number of times in the codeword, or not at all. How many different code words can Igor use?


Free download e-book in a convenient format, watch and read:
Download the book Unified State Examination, Informatics, 14 options, Typical test tasks, Leshchiner V.R., 2018 - fileskachat.com, fast and free download.

Download pdf
Below you can buy this book at the best discounted price with delivery throughout Russia.

Task 2. Demo version of the Unified State Examination 2018 Informatics (FIPI):

Boolean function F given by the expression ¬x ∨ y ∨ (¬z ∧ w).
The figure shows a fragment of the truth table of the function F, containing all sets of arguments for which the function F is false. Determine which column of the truth table of the function F corresponds to each of the variables w, x, y, z.

Variable one Variable 2 Variable 3 Variable 4 Function
??? ??? ??? ??? F
1 0 0 0 0
1 1 0 0 0
1 1 1 0 0

Write the letters in your answer. w, x, y, z in the order in which the columns corresponding to them go (first - the letter corresponding to the first column; then - the letter corresponding to the second column, etc.) Write the letters in the answer in a row, no separators between letters are needed.

Task 3. Demo version of the Unified State Examination 2018 Informatics (FIPI):
In the figure on the right, the road map of the N-sky district is shown as a graph, the table contains information about the length of each of these roads (in kilometers).


Since the table and the diagram were drawn independently of each other, the numbering of settlements in the table is in no way connected with the letter designations on the graph. Determine the length of the road from the point BUT to paragraph G. In your answer, write down the whole number - as it is indicated in the table.

4 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):
Below are two fragments of tables from the database of residents of the microdistrict. Each row of table 2 contains information about the child and one of his parents. The information is represented by the value of the ID field in the corresponding line of Table 1. Based on the given data, determine how many children had mothers over 22 full years at the time of their birth. When calculating the answer, consider only information from
the given fragments of the tables.


5 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):
Encrypted messages containing only ten letters are transmitted over the communication channel: A, B, E, I, K, L, R, C, T, U. An uneven binary code is used for transmission. Code words are used for nine letters.


Specify the shortest code word for the letter B, under which the code will satisfy the Fano condition. If there are several such codes, indicate the code with least numerical value.

6 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):
The input of the algorithm is a natural number N. The algorithm builds a new number based on it R in the following way.

1. A binary notation of a number is being built N.

2. Two more digits are added to this entry on the right according to the following rule:

- add up all the digits of the binary notation of the number N, and the remainder after dividing the sum by 2 is added to the end of the number (on the right). For example, the entry 11100 converted to record 111001 ;

- the same actions are performed on this record - the remainder of dividing the sum of its digits by 2 is added to the right.

The record obtained in this way (it contains two digits more than in the record of the original number N) is a binary record of the required number R.
Enter the minimum number R, which exceeds the number 83 and can be the result of this algorithm. Write down this number in decimal notation.

7 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):
A fragment of a spreadsheet is given. From cell B3 into a cell A4 formula has been copied. When copying the addresses of the cells in the formula, they automatically changed. What is the numeric value of the formula in the cell A4?


Note: The $ sign denotes absolute addressing.

8 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

Write down the number that will be printed as a result of the following program. For your convenience, the program is presented in five programming languages.

1 2 3 4 5 6 7 8 9 10 11 var s, n: integer ; begin s := 260 ; n := 0 while s > 0 do begin s : = s - 15 ; n := n + 2 writeln (n) end .

var s, n: integer; begin s:= 260; n:=0; while s > 0 do begin s:= s - 15; n:= n + 2 writeln(n) end.

9 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

An automatic camera produces bitmaps of size 640 × 480 pixels. In this case, the size of the file with the image cannot exceed 320 KBytes, data packing is not performed. What is the maximum number of colors that can be used in a palette?

10 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

All 4-letter words made up of letters D, E, To, O, R, are listed in alphabetical order and numbered starting with 1 .
Below is the beginning of the list.

1. DDDD 2. DDDE 3. DDDD 4. DDDO 5. DDDR 6. DDED …

What is the first word in the list that starts with a letter? K?

11 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

Below, a recursive algorithm is written in five programming languages F.
Pascal:

1 2 3 4 5 6 7 8 9 procedure F(n: integer ) ; begin if n > 0 then begin write(n) ; F(n - 3 ) ; F(n div 3 ) end end ;

procedure F(n: integer); begin if n > 0 then begin write(n); F(n - 3); F(n div 3) end end;

Write down in a row without spaces and separators all the numbers that will be printed on the screen when making a call F(9). Numbers must be written in the same order they are displayed on the screen.

12 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

In TCP/IP networking terminology, a netmask is a binary number that determines which part of a host's IP address refers to the network address and which part refers to the address of the host itself on that network. Usually, the mask is written according to the same rules as the IP address - in the form of four bytes, with each byte written as a decimal number. At the same time, in the mask, first (in the highest digits) there are ones, and then from a certain digit - zeros.
The network address is obtained by applying a bitwise conjunction to the given host IP address and mask.

For example, if the host IP address is 231.32.255.131 and the mask is 255.255.240.0, then the network address is 231.32.240.0.

For host with IP address 57.179.208.27 network address is 57.179.192.0 . What is greatest possible number units in the ranks of the mask?

13 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

When registering in a computer system, each user is given a password consisting of 10 characters. Capital letters of the Latin alphabet are used as symbols, i.e. 26 various symbols. In the database, each password is stored with the same and the smallest possible integer byte. In this case, character-by-character coding of passwords is used, all characters are encoded with the same and the minimum possible number of bits.

Determine the amount of memory (in bytes) required to store data about 50 users. In the answer, write down only an integer - the number of bytes.

14 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

Performer The draftsman moves on the coordinate plane, leaving a trace in the form of a line. The draftsman can execute the command move to (a, b), where a, b are integers. This command moves the Painter from the point with coordinates (x,y) to the point with coordinates (x + a, y + b).

The draftsman was given the following algorithm to execute (the number of repetitions and the magnitude of the offset in the first of the repeated commands are unknown):

START move by (4, 6) REPEAT… ONCE move by (…, …) move by (4, -6) END REPEAT move by (-28, -22) END

As a result of executing this algorithm, the draftsman returns to starting point. Which greatest the number of repetitions could be indicated in the construction "REPEAT ... ONCE"?

15 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

The figure shows a diagram of roads connecting cities A, B, C, D, D, E, G, H, I, K, L, M.
On each road, you can only move in one direction, indicated by the arrow.
How many different ways are there from the city BUT in town M passing through the city F?

16 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

The value of the arithmetic expression: 49 10 + 7 30 – 49 - written in a number system with a base 7 . How many digits 6 » contained in this entry?

17 task. Demo USE 2018 Informatics (FIPI):

In the search engine query language, to denote the logical operation " OR» symbol is used « | ", and to denote the logical operation " And" - symbol " & ».

The table shows queries and the number of pages found by them for a certain segment of the Internet.

Request Pages found (in hundreds of thousands)
Butterfly 22
Caterpillar 40
Tractor 24
Tractor | Butterfly | Caterpillar 66
Tractor & Caterpillar 12
Tractor & Butterfly 0

How many pages (in hundreds of thousands) will be found for the query Butterfly & Caterpillar?
It is believed that all requests were executed almost simultaneously, so that the set of pages containing all the searched words did not change during the execution of the requests.

18 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

For what is the largest integer BUT formula

identically true, that is, it takes the value 1 for any integer non-negative x and y?

19 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

The program uses a one-dimensional integer array A with indices from 0 before 9 . The element values ​​are 3, 0, 4, 6, 5, 1, 8, 2, 9, 7 respectively, i.e. A=3, A=0 etc.

Determine the value of a variable c after executing the following fragment of this program:

1 2 3 4 5 6 7 8 9 c:=0; for i : = 1 to 9 do if A[ i- 1 ] > A[ i] then begin c : = c + 1 ; t := A[i] ; A[ i] := A[ i- 1 ] ; A[ i- 1 ] := t; end ;

c:=0; for i:= 1 to 9 do if A > A[i] then begin c:= c + 1; t:= A[i]; A[i] := A; A := t; end;

20 task. Demo version of the Unified State Examination 2018 Informatics (FIPI):

The algorithm is written in five programming languages ​​below. Having received a number x, this algorithm prints two numbers: L and M. Enter the smallest number x, upon input of which the algorithm prints first 5 , and then 7 .

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 var x, L, M: integer ; begin readln(x) ; L:=0; M:=0; while x>0 do begin M : = M + 1 ; if x mod 2<>0 then L : = L + 1 ; x := x div 2 ; end ; writeln(L) ; writeln(M) ; end.

var x, L, M: integer; begin readln(x); L:= 0; M:= 0; while x>0 do begin M:= M + 1; if x mod 2<>0 then L:= L + 1; x:=x div 2; end; writeln(L); writeln(M); end.

21 tasks. Demo version of the Unified State Examination 2018 Informatics (FIPI):

Write in the answer the number that will be printed as a result of the following algorithm.

Pascal:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 var a, b, t, M, R : longint ; function F(x: longint ) : longint ; begin F: = 2 * (x* x- 1 ) * (x* x- 1 ) + 27 ; end ; begin a: =- 20 ; b:=20; M:=a; R: = F(a) ; for t: = a to b do begin if (F(t)<= R) then begin M: = t; R: = F(t) end end ; write (M+ R) end .

var a, b, t, M, R:longint; function F(x: longint): longint; begin F:= 2*(x*x-1)*(x*x-1)+27; end; begin a:=-20; b:=20; M:=a; R:=F(a); for t:= a to b do begin if (F(t)<= R) then begin M:=t; R:=F(t) end end; write(M+R) end.

22 task. Demo USE 2018 Informatics (FIPI):

Performer M17 converts the number written on the screen.
The performer has three teams that are assigned numbers:
1. add 1
2. add 2
3. multiply by 3

The first of them increases the number on the screen by 1, the second increases it by 2, the third multiplies by 3. The program for the M17 performer is a sequence of commands.

How many programs exist that convert the original number 2 in number 12 and the trajectory of the program's calculations contains the numbers 8 and 10 ? The trajectory must contain both specified numbers.

The trajectory of program computations is the sequence of results of execution of all program commands. For example, for program 132, with the initial number 7, the trajectory will consist of the numbers 8, 24, 26.

Solution 23 tasks of the exam in informatics demo version 2018 FIPI:

How many different sets of boolean values ​​are there x1, x2, … x7, y1, y2, … y7 that satisfy all of the following conditions?



(¬x1 ∨ y1) → (¬x2 ∧ y2) = 1
(¬x2 ∨ y2) → (¬x3 ∧ y3) = 1

(¬x6 ∨ y6) → (¬x7 ∧ y7) = 1

As an answer, you need to indicate the number of such sets.

Solution 24 task of the exam in informatics demo version 2018 FIPI:

A natural number not exceeding 10 9 . We need to write a program that displays the maximum digit of a number that is a multiple of 5. If there are no digits in the number that are multiples of 5 , it is required to display NO. The programmer wrote the program incorrectly. Below this program for your convenience is given in five programming languages.
Reminder: 0 is divisible by any natural number.
Pascal:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 var N, digit, maxDigit: longint ; begin readln(N) ; maxDigit := N mod 10 ; while N > 0 do begin digit : = N mod 10 ; if digit mod 5 = 0 then if digit > maxDigit then maxDigit := digit; N := N div 10 ; end ; if maxDigit = 0 then writeln ("NO" ) else writeln (maxDigit) end .

var N, digit, maxDigit: longint; begin readln(N); maxDigit:= N mod 10; while N > 0 do begin digit:= N mod 10; if digit mod 5 = 0 then if digit > maxDigit then maxDigit:= digit; N:= N div 10; end; if maxDigit = 0 then writeln("NO") else writeln(maxDigit) end.

Do the following in sequence:
1. Write what this program will display when you enter a number 132 .
2. Give an example of such a three-digit number, when you enter
The program gives the correct answer.
3. Find all errors in this program (there may be one or more). It is known that each error affects only one line and can be fixed without changing other lines. For each error:
1) write out the line where the error was made;
2) indicate how to fix the error, i.e. give the correct version of the string.
It suffices to indicate the errors and how to fix them for one programming language.

Solution 25 of the USE task in informatics Demo version 2018:

Given an integer array of 30 elements. Array elements can take integer values ​​from 0 before 10000 inclusive. Describe in one of the programming languages ​​an algorithm that finds the number of elements of an array greater than 100 and wherein multiples of 5, and then replaces each such element with a number equal to the number found. It is guaranteed that there is at least one such element in the array. As a result, you need to display the modified array, each element of the array is displayed on a new line.

For example, for an array of six elements: 4 115 7 195 25 106
the program should output the numbers: 4 2 7 2 25 106

The initial data is declared as shown below in examples for some programming languages. It is forbidden to use variables not described below, but it is allowed not to use some of the variables described.

Pascal:

1 2 3 4 5 6 7 8 9 10 const N = 30 ; var a: array [ 1 .. N ] of longint ; i, j, k: longint ; begin for i : = 1 to N do readln (a[ i] ) ; ... end .

const N = 30; var a: array of longint; i, j, k: longint; begin for i:= 1 to N do readln(a[i]); ... end.

As an answer, you need to give a fragment of the program, which should be in place of the ellipsis. You can also write the solution in another programming language (specify the name and version of the programming language used, for example Free Pascal 2.6). In this case, you must use the same initial data and variables that were proposed in the condition.

Analysis of the 26 task of the demo version of 2018 (FIPI):
Two players, Petya and Vanya, play the following game. There is a pile of stones in front of the players. Players move in turn, Petya makes the first move. In one move, the player can add to the pile one stone or increase the number of stones in the pile twice. For example, having a pile of 15 stones, in one move you can get a pile of 16 or 30 stones. Each player has an unlimited number of stones to make moves.

The game ends when the number of stones in the pile becomes at least 29. The winner is the player who made the last move, that is, the first to receive a pile containing 29 or more stones. At the initial moment, there were S stones in the pile, 1 ≤ S ≤ 28.

We will say that a player has a winning strategy if he can win for any moves of the opponent. To describe a player's strategy means to describe what move he must make in any situation that he may encounter with different opponent's plays. To the description of the winning strategy do not do it include the moves of the player playing according to this strategy, which are not unconditionally winning for him, i.e. not being winning regardless of the opponent's game.

Exercise 1
a) Indicate such values ​​of the number S for which Petya can win in one move.
b) Indicate a value of S for which Petya cannot win in one move, but for any Petya's move Vanya can win with his first move. Describe Vanya's winning strategy.

Task 2
Indicate two such values ​​of S for which Petya has a winning strategy, moreover:
- Petya cannot win in one move;
— Petya can win with his second move, regardless of how Vanya moves.
For the indicated values ​​of S, describe Petya's winning strategy.

Task 3
Specify the value of S at which:
- Vanya has a winning strategy that allows him to win on the first or second move in any game of Petya;
- Vanya does not have a strategy that will allow him to win with a guarantee on the first move.

For the given value of S, describe Vanya's winning strategy. Construct a tree of all games possible with this winning strategy (in the form of a figure or a table). On the edges of the tree indicate who makes the move; in knots - the number of stones in a position

The tree should not contain games that are impossible for the winning player to implement his winning strategy. For example, the complete game tree is not a valid answer for this task.

Analysis of the 27 tasks of the demo version of 2018 (FIPI):

The input of the program is a sequence of N positive integers, all numbers in the sequence are different. All pairs of different elements of the sequence are considered (the elements of a pair do not have to be side by side in the sequence, the order of the elements in the pair is not important). Need to define the number of pairs for which the product of elements is divisible by 26 .

Description of input and output data The first line of the input data specifies the number of numbers N (1 ≤ N ≤ 1000). In each of the subsequent N lines contains one positive integer not exceeding 10 000 .
As a result, the program should print one number: the number of pairs in which the product of elements is a multiple of 26.

Input example:

4 2 6 13 39

Example output for the example input above:

From the four given numbers, you can make 6 pairwise products: 2 6 = 12 2 13 = 26 2 39 = 78 6 13 = 78 6 39 = 234 13 39 = 507

Of these, 4 works are divided into 26:

2 13=26; 2 39=78; 6 13=78; 6 39=234

It is required to write a time-efficient and memory-efficient program for
solution of the described problem.

-> demo USE 2018


2022
maccase.ru - Android. Brands. Iron. News