597 broken input

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

Moderator: Board moderators

Post Reply
Quantris
Learning poster
Posts: 80
Joined: Sat Dec 27, 2003 4:49 am
Location: Edmonton AB Canada

597 broken input

Post by Quantris »

I realise this problem has a red checkmark (I didn't at first since I accessed it via http://uva.onlinejudge.org/external/5/597.html directly), but it seems the input doesn't follow the specification (giving me runtime errors until I figured out the problem).

I confirmed there aren't any empty lines in the input (as expected). However, there seem to be:
1) lines that don't contain any space character (ASCII 32)
2) lines that do have a space but do not have a period (ASCII 46) after the first space

According to the statement: "You may assume that the "last name" is that portion of the file name between the first space character and the period.". That means (IMO) that the existence of a space character and a period somewhere after it is guaranteed. Please look into it.

Also the statement seems to contradict the example illustrated in the included figure; in the text it says the edited version of "John Smith.jpg" is "Smith John.jpg" while the figure shows the addition of a comma (changing "Christina Peter.jpg" to "Peter, Christina.jpg"). The sample output doesn't clear up this issue. For my solution I assumed the simpler version (without a comma).

Finally the statement doesn't mention anything about the sorting order to use; I assumed default lexicographic string sorting (ASCII collation) which is consistent with all the information given but is not uniquely so (particularly I wonder about how to treat spaces [and commas if needed]).

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

Re: 597 broken input

Post by brianfry713 »

The red check problems don't have a valid dataset and you can't get AC. Create a dataset and email it with the corrected sample I/O to revilla@mac.uva.es
Check input and AC output for thousands of problems on uDebug!

Quantris
Learning poster
Posts: 80
Joined: Sat Dec 27, 2003 4:49 am
Location: Edmonton AB Canada

Re: 597 broken input

Post by Quantris »

I know I can't get AC. I thought I read somewhere that red checkmarks could mean no I/O or could mean the OJ has input but not a verified output. Not that I could find anywhere that explains what the checkmarks mean (do you have a link for that?)

Anyway, the judge is definitely providing non-empty input to my program, so in case that is meant to be a real input I provided the remarks above. If I find time I will create an I/O set for it, though the problem is listed as having been written by Dr. Revilla so he could probably answer questions about the ambiguities better than I could guess them.

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

Re: 597 broken input

Post by brianfry713 »

I don't think you can assume that the judge's input is valid for problems with a red check. I don't know what the judge's input and output is, it could just be random text.
Red check = no valid dataset
Yellow check = special judge, multiple correct outputs may be accepted
Green check = normal problems

According to this:
http://www.comp.nus.edu.sg/~stevenha/pr ... /vol5.html
This problem is from: Greater New York Regionals - 1997
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Bugs and suggestions”