895 - Word Problem - Backend Is WRONG

The forum to report every bug you find or tell us what you'd like to find in UVa OJ's new system

Moderator: Board moderators

Post Reply
20717TZ
New poster
Posts: 31
Joined: Tue Apr 27, 2004 7:41 pm
Location: Santa Clara / Mountain View, CA, USA
Contact:

895 - Word Problem - Backend Is WRONG

Post by 20717TZ » Thu Oct 03, 2013 10:18 am

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.
I Believe I Can - leestime.com

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 895 - Word Problem - Backend Is WRONG

Post by brianfry713 » Thu Oct 03, 2013 11:06 pm

You are correct. There are repeated words in the judge's input, and they should be counted multiple times in the output.
Check input and AC output for thousands of problems on uDebug!

20717TZ
New poster
Posts: 31
Joined: Tue Apr 27, 2004 7:41 pm
Location: Santa Clara / Mountain View, CA, USA
Contact:

Re: 895 - Word Problem - Backend Is WRONG

Post by 20717TZ » Fri Oct 04, 2013 3:21 am

NO. they should NOT be counted multiple times in the output. because the problem description clearly states
number of DIFFERENT words
I Believe I Can - leestime.com

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 895 - Word Problem - Backend Is WRONG

Post by brianfry713 » Tue Oct 08, 2013 12:50 am

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.
Check input and AC output for thousands of problems on uDebug!

tazy
New poster
Posts: 1
Joined: Fri Jan 17, 2014 2:03 pm

Re: 895 - Word Problem - Backend Is WRONG

Post by tazy » Fri Jan 17, 2014 2:24 pm

There are repeated words in the judge's input, and they should be counted multiple times in the out
Tazy

User avatar
uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: 895 - Word Problem - Backend Is WRONG

Post by uDebug » Tue Mar 18, 2014 1:45 pm

Replying to follow the thread.
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.

Post Reply

Return to “Bugs and suggestions”