Talk:UVa 10252 - Common Permutation

I've had a LOT of trouble trying to get the UVa judge to accept this one, but the Programming Challenges judge accepts it just fine. Why is that I wonder? --Kentaro 02:07, 13 Apr 2005 (EDT)

I just looked at my solution to the problem. I read in the input strings by line rather than as space delimited strings. I also remember being mad at this problem thinking my code is surely correct for getting WA when I was reading in as space delimited strings rather than lines. Hope that fixes your problem, and keep on posting ;) --Rrenaud 02:23, 13 Apr 2005 (EDT)

My code was always reading the input as lines. What bugs me is that the program passes on the Programming Challenges judge and not the UVa judge. --Kentaro 12:31, 13 Apr 2005 (EDT)

Maybe just post your code here? It should be short. --Rrenaud 01:44, 14 Apr 2005 (EDT)

Here's what I wrote, in C++. This can always be erased if it is cluttering up the page... --Kentaro 10:53, 14 Apr 2005 (EDT)

I used counted instead of actually sorting it.. it could be simply that the PC's site has easier inputs.. Larry 11:02, 14 Apr 2005 (EDT)

But why would counting letter frequencies as opposed to sorting and taking LCS be any different? --Kentaro 07:25, 15 Apr 2005 (EDT)

Code has been erased. I decided to just sort the two lines of input and take a straight LCS and it worked like a charm. Strange, but I'm not going to argue. I consider the problem solved. --Kentaro 23:12, 15 Apr 2005 (EDT)