843 - Crypt Kicker
Moderator: Board moderators
843 - Crypt Kicker
In the problem description it said:
"If there is more than one solution, any will do. "
but the icon of the problem shows that it doesn't use special judge...
may any adms tell me what's going on?
"If there is more than one solution, any will do. "
but the icon of the problem shows that it doesn't use special judge...
may any adms tell me what's going on?
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
843 - Crypt Kicker
What are the gotchas on problem #843? I am almost sure my program works, but I get WA.
Any idea of something I may be missing?
Any idea of something I may be missing?
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
And that's what I do! If input gives me "ac" and the dictionary "xy", "xy will appear on output only if a new "ac" appears. That's right, isn't it? a sample follows.Adrian Kuegel wrote:Each letter must be decoded uniquely, that means that if the coded word is ab, the decoded word can't be cc.
input
2
ac
ad
xy xz cv
output
ac ad **
-
- Guru
- Posts: 724
- Joined: Wed Dec 19, 2001 2:00 am
- Location: Germany
Judge program
I submit a program that output nothing, and got accepted with runtime = 0.00s.
: )
: )
Adrian Kuegel wrote:I have now written the special judge program and send it to the admins. If after rejudge you get Wrong answer, you can send me your program, so that I can look, if my judge program or your program is wrong.
I'm having trouble coming up with a fast enough algorithm.
I tried a branch-and-bound method which iterates through each word in the input line and tried every word of the same length in the dictionary. If the current decoding is consistent it recurses to the next word in the input, otherwise it bounds the search.
Is there another methodology which is faster?
I tried a branch-and-bound method which iterates through each word in the input line and tried every word of the same length in the dictionary. If the current decoding is consistent it recurses to the next word in the input, otherwise it bounds the search.
Is there another methodology which is faster?
843 Crypt Kicker
I am stumped on how to do this problem within the 10 second limit. The method I have is a recursive function that checks each word against all the words in the dictionary that are the same length and backs up everytime it hits a snag. It works beautifully but unfortunately it times WAY out at only 100 words and considering that the dictionary could be up to 1000 words there is obviously a different way to do this. Any hints or help?
-
- Experienced poster
- Posts: 145
- Joined: Sat Feb 23, 2002 2:00 am
- Location: Paris, France
- Contact: