Page 1 of 1

895 - Word Problem - Backend Is WRONG

Posted: Thu Oct 03, 2013 10:18 am
by 20717TZ
In the problem description, it states very clearly:
For each puzzle line in the input, a single line of output should be produced, containing the number of DIFFERENT words in the dictionary that can be formed using the letters in the puzzle line.
My code runs with the following input:

Code: Select all

ant
bee
cat
dog
ewe
fly
gnu
abcdefgh
abcdefghij
x
x
xxx
y
z
#
b e w
b b e e w w
t a n c u g d
x
x y
x y z
x x x
#
giving the output:

Code: Select all

0
2
3
1
2
3
2
But I got a "Wrong Answer" verdict.

However, if I change my code to make the output to

Code: Select all

0
2
3
2
3
4
3
I got an "Accepted" verdict.

Here is my submission history for this problem:
# Problem Verdict Language Run Time Submission Date
12438310 895 Word Problem Accepted C++ 0.015 2013-10-03 06:02:01
12438183 895 Word Problem Wrong answer C++ 0.019 2013-10-03 05:33:34
So I believe the backend is INCORRECT. If a word appears twice in the input dictionary, it should NOT be counted twice in the output.

Re: 895 - Word Problem - Backend Is WRONG

Posted: Thu Oct 03, 2013 11:06 pm
by brianfry713
You are correct. There are repeated words in the judge's input, and they should be counted multiple times in the output.

Re: 895 - Word Problem - Backend Is WRONG

Posted: Fri Oct 04, 2013 3:21 am
by 20717TZ
NO. they should NOT be counted multiple times in the output. because the problem description clearly states
number of DIFFERENT words

Re: 895 - Word Problem - Backend Is WRONG

Posted: Tue Oct 08, 2013 12:50 am
by brianfry713
If you want to get AC the repeated words should be counted multiple times in the output. The problem statement should be changed or the repeated words should be removed from the judge's input.

Re: 895 - Word Problem - Backend Is WRONG

Posted: Fri Jan 17, 2014 2:24 pm
by tazy
There are repeated words in the judge's input, and they should be counted multiple times in the out

Re: 895 - Word Problem - Backend Is WRONG

Posted: Tue Mar 18, 2014 1:45 pm
by uDebug
Replying to follow the thread.