The following is decrypted list of tasks, that I gave at hscool entrance examinations at September, 13, the year of 1998. Cyphers were easy, and those, who studied at my groups earlier, overcome them without difficulties.
Arvi the Hacker
Entrance Examination To Civil Hackers' School (The Year Of 1998/99) 1. Without usage of extra memory (variables, arrays, stack,..) change values of two integer variables, X and Y. You can use only assignment statements, arithmetical and logical operations, standard functions, a piece of cheese. 1*. Do the same, useing only assignment statements and only one operation. 2. Stupid Sergeant was taught (it took a great deal of trouble over it) to remember five integer numbers (X, Y, N, L, M and D), increment and decrement them by one and how to write down number N on the checked paper in row Y, column X. Prepare detailed instruction for Stupid Sergeant, by execution which he will put first hundred non-negative numbers in a spiral shape: 20 21 22 23 24 25 19 6 7 8 9 26 18 5 0 1 10 .. 17 4 3 2 11 16 15 14 13 12 2*. Make the same for Superstupid Sergeant, that know how to write down in cells only digits. 3. Game program (among all) outputs triangle -- clown's cap. You must crack it by turning triangle by 15 degrees counter-clockwise around its lower left corner (raise clown's cap in greeting). After detailed code inspection you find lines, that output, as you suppose, triangle: ... 560 CIRCLE (100,300),50 570 LINE ( 50, 250)-(150, 250) 580 LINE (150, 250)-(100, 200) 590 LINE (100, 200)-( 50, 250) ... What and to what you must change? ----------------------------------------------------------------------------- For those, who will take up third task, we remind some knowledge from school geometry course: COSINE of a c u t e a n g l e in right-angled triangle -- ratio of cathetus, adjoining this angle, to hypotenuse. Symbol: cos. SINE of a c u t e a n g l e in right-angled triangle -- ratio of cathetus, opposite to this angle, to hypotenuse. Symbol: sin. Those ratios are constant to different triangles and depends only on angle. For pupils with only the lowest mark "two" in their records to mention, hypotenuse is the side of right-angled triangle, opposite to the right angle. Computer measures angles in radians. 360 degrees are equal to 2 pi (2*3.1415926=6.2831852) radians. Time for all three problems -- three hours. Problems are printed in order of increased complexity. Questioning to people, that conduct the examination, is forbidden. AtH//HPG