The output file "rez" contains on every line excepting the last one a
number m, having the format:
i x y
where:
i represents the colour;
x and y the number of the rod from which, respectively on which, the ball is
moved; these
numbers are between 1 and n+1.
m represents the total number of moves
Example :
file dates:
2 1 2 |
1 1 1 2 |
2 2 -----------------
1 2 3
file rez:
2 2 3
2 2 3 2 2 |
1 1 2 1 1 |
2 3 1 -----------------
2 3 2 1 2 3
5
Time for test : 1min/test on a 586 at 133MHz.
prof.Maria and Adrian Nita
"Emanuil Gojdu" Highschool
Oradea
2nd Problem: Numbers (30 points) (it's easier than it seems !)
Find out all the positive integer numbers n < 60.000 with the
following feature:
if 1 < m < n and if mis a positive integer and prime number
with n, then m is a prime number.
Write in the file 'numsol' having the structure:
n1
n2
...
nk
where ni are the requested numbers.
Time for test : 10".
prof. Maria and Adrian Nita
"Emanuil Gojdu" Highschool
Oradea
[Index]
[Important Informations]
[Participants]
[4th Round]
[6th Round]