|
|
вернуться в форумI have a problem. EXPLAIN ME! Please! Послано Alexey 7 авг 2005 19:42 I Have a problem. Explain me. 1 2 3 4 5 4 1 5 2 3 1 2 3 4 5 2 4 3 1 5 1 2 3 4 5 4 1 3 2 5 1 2 3 4 5 2 4 3 1 5 ... What shall I do? Edited by author 07.08.2005 19:54 I see no ambiguity in the problem definition. Just read it carefully (-) What about cycle? Послано Alexey 7 авг 2005 21:18 I repeated it for 6 times and I didn't have 1 2 3 4 5 Re: What about cycle? You must apply FIRST permutation to change sequence!!! Look: 4 1 5 2 3 2 4 3 1 5 1 2 5 4 3 4 1 3 2 5 2 4 5 1 3 1 2 3 4 5 Every time you do the following actions: b[i] := a[b[i]]; where a - first (initial) permutation and b - current permutation. +++++++++++NOK++++++++++++ Comment for non-russian programmers: 'NOK' means 'LCM' (-) Thanks for the information. Or to give theories under the decision of problems(I think at you is). And that at me while is not present the teacher. Thanks Thank you very much. If really helps me. I understood. Gleb Grenkin! Many thanks! |
|
|