KöMaL - Középiskolai Matematikai és Fizikai Lapok
Sign In
Sign Up
 Magyar
Information
Contest
Journal
Articles
Contest Rules
Entry Form
Problems
Results
Previous years

 

Exercises and problems in Informatics
April 2003

Please read The Conditions of the Problem Solving Competition.

I. 49. N fans watching a match throw up their caps as their team wins and then every fan catches exactly one cap falling down. Write a program (i49.pas, ...) that displays the number of possible ways of exactly K (0\(\displaystyle \le\)K\(\displaystyle \le\)N) ones out of the N (0\(\displaystyle \le\)N\(\displaystyle \le\)12) fans getting their own caps back.

The example shows all cases for N,K\(\displaystyle \le\)4.
(10 points)

 K=0K=1K=2K=3K=4
N=01    
N=101   
N=2101  
N=32301 
N=498601

I. 50. We make a wallpaper-pattern by first dividing a square into four equal squares, then removing the quarters adjacent to the centre of the original square. These steps are iteratively applied again to the remaining 3 quarters in each smaller square. We repeat the process N times, see the Figures.

N=1N=2N=3N=6

Your program (i50.pas, ...) should display the resulting wallpaper-pattern if N (1\(\displaystyle \le\)N\(\displaystyle \le\)10) is given.
(10 points)

I. 51. At the beginning of the day on a stock exchange, the current rate of each share is known. During the day we get a list of the actual sales (i.e. which and how many shares are sold as well as their sale prices) arranged in chronological order (at most 1000 sales are recorded). Columns of the first figure show the number of the transaction, the name of the share, the amount sold and the sale price, respectively.

TimeShareAmountPrice
1OTP201500
2OTP231300
3MALÉV51000
4OTP201400
5MOL801000
6MOL10900

Prepare your sheet (i51.xls) which - using these data - computes for each stock (i.e. columns of the second figure) its final price at the end of the day (second row), the difference (third row) between the starting price (given in the first row) and final price, the amount of stocks sold (fourth row) and the total value of that stock (fifth row). Stocks that were sold at a higher price on the whole compared to their daily starting prices should be marked red, while those at lower prices should be marked blue.
(10 points)

 OTPMÁVMALÉVMOL
Starting price1342144314431111
Final price140014431000900
Difference580-443-211
Amount630590
Total value879000500089000

Send your solutions to the following e-mail address:

Deadline: 13 May 2003

Our web pages are supported by:   Ericsson   Cognex   Emberi Erőforrás Támogatáskezelő   Emberi Erőforrások Minisztériuma   Nemzeti Tehetség Program    
MTA Energiatudományi Kutatóközpont   MTA Wigner Fizikai Kutatóközpont     Nemzeti
Kulturális Alap   ELTE   Morgan Stanley