ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1024. Permutations

Thank you!
Posted by Gleb Grenkin 15 Aug 2005 07:43
Thank you!
In this forum I knew how solve this task!

We must find lengths of pathes for every element of permutation and count their LCM.

Don't forget about Int64 in Pascal and long long in C++.

Here is my AC solution:

[code deleted]

Edited by author 15.08.2005 07:46

Edited by moderator 04.12.2019 20:48
Re: Thank you!
Posted by Adaon 17 Feb 2008 09:52


Edited by author 17.02.2008 09:53
Re: Thank you!
Posted by Bobur 19 Feb 2008 00:03
thanks a lot!!  i can't find correct algo till today!!
Re: Thank you!
Posted by Ras Misha [t4ce] 18 Mar 2009 10:55
i think that this code must be deleted
Re: Thank you!
Posted by Rashad 11 Apr 2010 23:23
This code give TLE on test 9, how did you have AC?
Re: Thank you!
Posted by gay 7 May 2010 13:21
Ydiota crocodilia pute
Re: Thank you!
Posted by Savchenkov (NNSTU) 28 Oct 2011 00:27
You don't need long long or int64.
Also, please delete your code, posting correct solution is against the rules!

Edited by author 28.10.2011 00:27