Is there anything noticeably wrong with this code?
Posted: Tue Apr 15, 2008 6:11 pm
This particular problem involved translating a block of text into Pig Latin. Fairly simple stuff, even with all the rules. Hell, my program works perfectly for me:
Here's the code.
Here's the output when I send it my entire English paper.
But the contest advisors were getting a very strange bug at run time: Halfway through their output they started to get seemingly random, non-text characters - as if the ouput had been shifted over in binary space. Now, as my paper is 1250+ words and combines most all of the exceptions and special cases given by the problem (which I shouldn't need to post, but if you need clarification on something specific I will scan the paper), there should be no problems. My output is all perfectly correct, everything is formatted properly, and I'm not getting "gibberish" (as they first described, which was rather pointless as 'gibberish' was what the output should have been, they later clarified as I mentioned above). So, I want to put this one out there for people to look at - can any one else reproduce the contest officials' results?
I'll be putting a little PHP script up that will run the program from my server so people without the time or patience to compile it themselves can still try random input.
edit: That should do it...
Here's the code.
Here's the output when I send it my entire English paper.
But the contest advisors were getting a very strange bug at run time: Halfway through their output they started to get seemingly random, non-text characters - as if the ouput had been shifted over in binary space. Now, as my paper is 1250+ words and combines most all of the exceptions and special cases given by the problem (which I shouldn't need to post, but if you need clarification on something specific I will scan the paper), there should be no problems. My output is all perfectly correct, everything is formatted properly, and I'm not getting "gibberish" (as they first described, which was rather pointless as 'gibberish' was what the output should have been, they later clarified as I mentioned above). So, I want to put this one out there for people to look at - can any one else reproduce the contest officials' results?
I'll be putting a little PHP script up that will run the program from my server so people without the time or patience to compile it themselves can still try random input.
edit: That should do it...