* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Download Space Olympics Tasks 98
Survey
Document related concepts
Transcript
Informatics Competitor Instructions A Competitor may ask the jury any question concerning the statement of a problem. A question must be asked in writing in a form of “Yes/No – question”. The jury may answer “yes”, “no”, “see the statement of problem”. Read the statement of problem carefully! To prevent any loss of information save your code on a hard or floppy disk periodically! After the expiry of a round any actions on a PC are forbidden. No corrections (even tiny) may be made in a Competitor’s code after the expiry of a round. Only one version of a Competitor’s code may be assumed as a result of a Competitor’s work, the source must be represented to the jury in an ASCII-file and a proper executable file. The files must be named according to the appendix below. After the expiry of a round a copy of a Competitor’s code shall be made in a Competitor’s presence. A Competitor shall give the list with a Competitor’s questions to the jury. A Competitor’s code shall be able to take its input data from a file and save its output data in a file too. The input/output data format and also the input/output file names shall be described in the statement of a problem. More over, examples of the input and output files shall be there too. Keep the data format carefully (!), especially take care of the output data. A wrong output data format may cause the jury’s misunderstanding of the solution of a problem and the solution will be judged wrong. Solution Check Procedure The jury shall not check out the listing of a code. Executable codes only will be tested. NO references on a right but “wrong” or “unfinished” algorithm will not be accepted from a Competitor. The jury has a right to compile a Competitor’s ASCII-file. If a compiler generates an error message during this procedure, the solution of problem is judged “0” points. A Competitor’s code will be examined under a set of tests. If a Competitor’s code output is correct, a Competitor will be awarded some points (the number of points depends on the level of a test). If the out is wrong – 0 points. NO solutions “for a part of a problem” shall be accepted. The sum of points awarded for each test of a testing set designed for the tested code is the total score for a problem solution. Recommendations From the above check procedure it follows: if it is difficult to solve a problem in general, try to find a particular solution. It may happen that a particular solution will pass a number of tests and you will be awarded some points for the problem. if you can find some particular solutions of a problem then let you code all the solutions and debug them. Then try to modify your code to a general solution. Remember (!): let you always have at hand an executable version of your code to give it to the jury in time (even if you have not generalised your code by the end of a round). Better represent an operational code for a particular solution than a non-operational code for a general solution of a problem! GOOD LUCK! Appendix: how to name files of a program. A program filenames must consist of the number of a problem and registration number of a Competitor. A filename extension must be standard (for DOS). For example: Z2_06.PAS – the program source code in Pascal, problem number 2, Competitor registration number 06; Z2_06.EXE – the executable program, file, problem number 2, Competitor registration number 06. 2 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA COMPUTER SCIENCE October 16-26, 1998 Problem 1. Radio. The astronauts on a planet use the special radio code for communication with the orbital module. (“*” represents one second signal, “-“ represents one second pause). A **----* B *-*---* C ***---* D *--*--* E **-*--* F *-**--* G ****--* H *---*-* I **--*-* J *-*-*-* K ***-*-* L *--**-* M **-**-* N *-***-* O *****-* P *----** Q **---** R *-*--** S ***--** T *--*-** U **-*-** V *-**-** W ****-** X *---*** Y **--*** Z *-*-*** space ***-*** The transmission can be distorted. It means that some pauses can be replaced by signals. For example ****---* (letter G) in the transmitted message can be distorted in the receipted message to *****-* (O), ****-** (W) or *******. To provide reliable communication the astronauts use a limited set of the words (the dictionary) they fix about in advance. The words in the message are separated by the space ***-***. The message is finished by the space too. The sample message (“NO SMOCKING”): *-***-******-****-******--****-**-******-****-*-***--*-**-***-*****--****-*** N O _ S M O K I N G _ The first signal of the message always belongs to the first transmitted letter, the last signal of the message belong to the last transmitted letter (i.e. space). Your task is to write a program that, given a dictionary and received message, finds all possible interpretations of the message. For example, if the dictionary contains the words: BLACK, FINISH, MOVE, RIGHT, ROCK, START and the received message is *****-******-*****-******--****-******-******-********-******-***********-*** then the message can be interpreted as MOVE RIGHT or BLACK ROCK Notes. 1. The file DICT.TXT contains the dictionary, the file RADIO.TXT contains the received message. 2. The first line of the file DICT.TXT contains the number K of the words in the dictionary, each of the K subsequent lines contains one word. 3. K<=50. Each word can not be longer than 10 letters. 4. The Character “*” in the file RADIO.TXT represents a signal, the character “-“ represents a pause. The first line of the file RADIO.TXT contains the number N; it is the whole number of the signal/pause characters in the message. Other lines contain the message, each line contains 70 characters (“*”/”-“) except the last line. 5. The message contains not more than 20 words. 6. The input data are correct. 7. Your program must write the file TEXT.TXT. Each line of the file must contain one interpretation of the message. 3 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA COMPUTER SCIENCE October 16-26, 1998 Problem 2. Where Are We? The star map is a rectangular photograph of the star sky made by powerful telescope. The star catalogue is made from this star map. It contains star descriptions: star name, magnitude M, co-ordinates X,Y. The axis X is along the bottom edge of the map, the axis Y is along the left edge of the map. There is a rectangular photograph of the part of the star sky. The scale of this photography and the scale of the star map are the same. The list of stars is made from this photography. It contains star co-ordinates and magnitude. The axis X is along the bottom edge of the photography, the axis Y is along the left edge of the photography. Co-ordinate axes of the map and the photography may be different. Task Write a program to define the names of the stars on the photography, according to the given star catalogue. Note. The test data for this problem provide a single solution. Input Data Co-ordinates X,Y and magnitude M are integer. 0<=X,Y,M<=32767. The file STARLIST.DAT contains the start catalogue. The first line contains the number of stars in the catalogue (N). In each line of the subsequent N pairs of line the first line of the pair contains the name of the star, the second one contains three integer numbers: magnitude M, co-ordinates X,Y. The numbers are separated by one space. Sample input of the star catalogue (STARLIST.DAT): 3 ALFA 2 13 19 BETA 3 17 2 GAMMA CASSIOPEA 122 The file PHOTO.DAT contains the photograph star list. The first line contains the number of the stars on the photography K (K<=20). In each of the subsequent K pairs of the lines the first line of the pair contains the asterisk “*”, the second – three integer numbers: magnitude M, co-ordinates X,Y. The numbers are separated by one space. Sample input of the photography star list (PHOTO.DAT): 2 * 2 10 18 * 3 14 1 The input data are correct. Output Data Your program must write the file OUTPUT.DAT. It must contain the data from the file PHOTO.DAT where symbols “*” are replaced by the star names according to the catalogue. Sample output 2 ALFA 2 10 18 BETA 4 This must be output file for the sample input. INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA MATH October 16-26, 1998 Level 4 1. The number a consists of 2 digits, doesn’t end in the digit 0, and after multiplication of the number by both of its digits we get a number that consists of equal digits. Find all the numbers a, which satisfy this condition. 2. Find all the values of parameter a such that parabolas y=x2+a and x=y2+a touch each other. 3. The median BK and the bisector CL of a triangle ABC intersect in the point P. Prove the equation PC _ AC = 1 LP BC 4. There was a volleyball tournament (each team played one game with every other). Team A is better than team B, is team A beats team B or team A beats any team C, which beat team B. Prove that if team T is a winner of the tournament it is better than all the remaining teams. 5. Find all the solutions of the system 4sin x . cos x = tan z 4sin y . cos z = tan x 4sin z . cos x = tan y that satisfy the condition -/2<x</2, -/2<y</2, -/2<z</2. 6. There are n devices on the surface of an asteroid, the shape of the asteroid is a sphere with a radius 1 km. Prove that the sum of the squares of the distances between all the pairs of these devices doesn’t exceed n2 km2. 5 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA MATH October 16-26, 1998 Level 3 1. In 1998 the age of a person was greater than the sum of the digits of the year when he was born by 1. Find the age of this person. 2. The angles A,B, and C of a non-convex quadrilateral ABCD are equal to 45 degrees. Find the measure of area of this quadrilateral, if the length of the diagonal from the angle D is equal to 2. 3. Find all the positive integers n such that 4n+5 and 9n+4 are squares of 2 integers. 4. Find the angles of a triangle if they satisfy the conditions: sin+ cos = sin, cos – sin = cos Prove that you find all the triples of a triangle, i.e. all the possible solutions. 5. Function f (t) is determined by a set of integers and for every integer x it satisfies the condition f(x-x2) + f(x+x2) = 98 Find f(30). 6. In a planetary system N there is a cosmoflight between any two planets and all the flights are carried out by one of the 2 companies. Prove that using the flights of only one of there companies one can make a trip between any pair of the planets (possible using the transfers). 6 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA MATH October 16-26, 1998 Level 2 1. Nick has only rouble coins in his purse. Prove that if he can pay 36 roubles using his coins, he can pay 30 roubles too. (There are coins of 1,2,5 roubles value in Russia.) 2. There is a digit 1 on the blackboard. Once in a minute it can be either multiplied by 3 or reduced by 1. Find the shortest time after which the number 1998 can appear on the blackboard. 3. Prove that the difference between the product of three consecutive positive integers and of their sum can never be equal to the digit 3 powered in integer degree (i.e. 3n where n is an integer). 4. The perpendicular bisectors of the sides AB, BC and CD of the convex quadrilateral ABCD do not intersect inside the quadrilateral and they intersect AD in three points that cut the side AD into 4 equal segments. Prove that ABCD is a trapezoid. 5. Nine tennis payers participated in the tournament and there was exactly 1 game between any pair of the players. It happened that the three first players achieved the same result, three last players achieved the same result too, and the 4th, the 5th , the 6th players achieved different results, which are less than the first and more that the last. How many points did the 5th player get? (In tennis a game can’t end in a draw, the winner gets 1 point, the loser – 0 points.). 6. In a planetary system N there is a cosmoflight between any two planets and all the flights are carried out by one of the 2 companies. Prove that using the flights of only one of there companies one can make a trip between any pair of the planets (possible using the transfers). 7 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA MATH October 16-26, 1998 Level 1 1. Find any representation of the number 1998 as a sum of 5 positive integers, using only two digits for each integer. 2. Olya has only rouble coins in her purse. Prove that of she can pay 19 roubles using her coins, she can pay 14 roubles too. (There are coins of 1,2,5 roubles value in Russia.) 3. Several trees grew along the side of the road. Once in spring the gardener planted new trees between any pair of the neighbour trees. Next year he repeated the procedure, and third year he repeated it gain. During all these years all the trees, survived. Could the number of all the trees become 1997? 4. Does there exist an integer n and an arrangement of the brackets in the numerator and in the denominator of the term 1:2:3:…:n 1:2:3:…:n that the value of the term is equal to 19/98. 5. A quadrilateral ABCD was created after the reflection of the rectangular triangle ABC on the hypotenuse AC. The point M is in the middle of the side BC. Find the angles of the triangle ABC if AM=DM. 6. In a planetary system N any two planets are connected with a straight line. Prove that a stupid Minister of transport of the system N can establish one-way motion on the line by such a scheme that anyone who flew from any of the planets can never return to that planet by such a network. 8 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA PHYSICS October 16-26, 1998 Level 4 1. During some process on a mass of ideal gas the pressure varies in inverse proportion to volume. What work has the gas done, if during the process it was given 120 J? 2. An alloy of gold and silver 400 g by mass has a density 14.104 kg/m3. Supposing the volume of the alloy is equal to the sum of volumes of the constituents, find the mass of gold in the alloy. 3. A lamp whose power is W is connected through a resistor with a resistance R to a circuit of a direct current with voltage U. The voltage on the resistor is less than a half of voltage in the circuit. Find the current flowing through the lamp. 4. A helicopter of mass M together with a cargo of mass m, hanging on a cable, flies up vertically with acceleration a. During the flight the cable breaks. Find the acceleration of the helicopter immediately following the break of the cable. 5. A rocket of cross sectional area S, moving space with a velocity V, hits a cloud of a motionless dust of a density p. What force of thrust should be produced by the engines of a rocket, that it could keep the same velocity? Consider the impacts of dust particles absolutely inelastic. Neglect any change to the mass of the rocket. 6. A metallic uncharged plate of area S and thickness d is a distance r from a point charge q and is oriented perpendicularly to vector r. Find the force, which attracts the plate to charge. The thickness of the plate d is a lot less, and the distance r is much greater than the linear sizes of the plate. 9 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA PHYSICS October 16-26, 1998 Level 3 1. Using the graph find the average velocity of the automobile for the first 10 sec of its driving. V m/s 30 15 t,s 0 5 10 2. After some gas has been released from a cylinder the pressure in it has decreased by 3 times, and temperature was reduced by 2 times. Find the portion of gas remaining in the cylinder, (m/m0). 3. Orbit time of a satellite on a circular orbit near a surface of some planet is T1. If the circular orbit of the satellite was at a height H from the surface of the planet, the orbit time of the satellite would be equal T2. Find an acceleration of free fall near the planet. Don’t take into account the rotation of the planet around its axis. 4. A helicopter of mass M together with a cargo of mass m, hanging on a cable, flies up vertically with acceleration a. During the flight the cable breaks. Find the acceleration of the helicopter immediately following the break of the cable. 5. A rocket of cross sectional area S, moving space with a velocity V, hits a cloud of a motionless dust of a density p. What force of thrust should be produced by the engines of a rocket, that it could keep the same velocity? Consider the impacts of dust particles absolutely inelastic. Neglect any change to the mass of the rocket. 6. Estimate the upthrust on a 1 m2-plate, whose bottom face has the temperature of 400K, upper – 300K. The plate is in air, whose temperature is 320 K and whose pressure is 0.1 Pa. 10 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA PHYSICS October 16-26, 1998 Level 2 1. Using the graph find the average velocity of the automobile for the first 10 sec of its driving. V m/s 30 15 t,s 0 5 10 2. 15kW – engine consumes 15 kg/h of petroleum. Find efficiency of the engine. q=4.6x107 J/kg 3. An alloy of gold and silver 400 g by mass has a density 1.4.104 kg/m3. Supposing the volume of the alloy is equal to the sum of volumes of the constituents, find the mass of gold in the alloy. 4. There are 8 completely identical spheres. In one of them a small hole is made. Using only two weighings on an analytical balance, find which this sphere is. 5. Two lamps 40 Watt and 60 Watt designed for identical voltage are connected in series to an electric circuit with this voltage. What power will each of the lamps consume? Resistance of the lamps is considered constant. 6. The departure time of a train in the schedule is 12.00. When it is 12.00 on your watch the last but one carriage of the train begins to pass you by. Its passing lasts 10 sec. The last carriage took 8 sec to pass by you. The train departed on schedule and has constant acceleration. By how much is your watch slow? 11 INTERNATIONAL SPACE OLYMPICS-98 KOROLEV, RUSSIA PHYSICS October 16-26, 1998 Level 1 1. Some oil whose volume is 11 litres has a mass 920 g. Find a density of the oil. 2. A piece of wood floats in water having 2/3 of its volume immersed. Find the density of wood. 3. To fill a tank of petroleum a pump with efficiency of 20 kg/min is used. Find the necessary time for filling a tank with a size of 3x2x1.5 m. 4. There are 8 completely identical spheres. In one of them a small hole is made. Using only two weighings on an analytical balance, find which this sphere is. 5. When heating up 1 litre of water with the help of a 100 W-boiler it is found that temperature of water achieves 900C and does not vary further, in spite of the fact that the boiler remains working. During what time after turning off a boiler will the water coo; down by 10C? 6. A cyclist started from A to B along a straight highway. When he was 18 km from A a rocket started after him with a velocity 10 times greater. Find the distance AB if the rocket has arrived at B together with the cyclist.