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 1174. Weird Permutations

I've Got Time Limit Expected
Posted by K P Charith Chowdary 28 Nov 2007 18:58
I have used the same program which was given in the problem..
By Just using a count and checking the input string..
i got the value..
But still i am getting TLE

Is there anyway in which i can optimise it??
LOL
Posted by G 19 May 2009 05:08
Your program works with O(n!) time: of course, it's TL.
Find the rule in which the next one is got.