Typos trends

Discuss about the puzzles, but without giving the solutions please !!!

Re: Typos trends

Postby imrehg » Mon Jan 31, 2011 12:13 am

Thanks a lot. Then back to work. :)
User avatar
imrehg
 
Posts: 5
Joined: Sun Jan 23, 2011 7:44 pm

Re: Typos trends

Postby Dmitry Morozov » Mon Jan 31, 2011 9:55 am

imrehg wrote:Hi,
Just submitted my Python 2.6.x attempt. It fails on test #3 and #4 with incorrect answer, but gives correct solutions at the toughest #5. I'm just wondering if it is possible to know whether this is really due to an incorrect solution (mighty possible, even if I hope it's not) or whether the fail is due to an output-formatting difference (with floating points it can happen)?


imrehg wrote about toughest five, but if he counts in zero-based way it should help.
tests 4 and 5 are all about sort. sort is alphanumerical so using builtin sort causes fail exactly on 4 and 5 and doesnt influence other tests.
also not obvious trick: 4 and 5 also fail when you trim() input lines in C# / Java
User avatar
Dmitry Morozov
 
Posts: 1
Joined: Tue Jan 18, 2011 10:19 am

Re: Typos trends

Postby darkhorse » Fri Feb 04, 2011 6:50 am

hi.
In the output of bigger test case provided, number of occurrences of
"occ foreclosure"
is 44.5 or 43.5 :?: ...my solution gives
43.5
.
User avatar
darkhorse
 
Posts: 1
Joined: Mon Jan 17, 2011 9:20 am

Re: Typos trends

Postby Lego Haryanto » Sat Feb 19, 2011 5:22 pm

darkhorse wrote:hi.
In the output of bigger test case provided, number of occurrences of
"occ foreclosure"
is 44.5 or 43.5 :?: ...my solution gives
43.5
.


Should be 44.5.
User avatar
Lego Haryanto
 
Posts: 4
Joined: Tue Jan 18, 2011 1:54 pm

Re: Typos trends

Postby Lego Haryanto » Sat Feb 19, 2011 5:26 pm

Admin, could you help check with my C++ verification, ... clicking Verify gives me something weird like this:

ERROR(incorrect): Incorrect result
Your submission failed to give the exact answer on the verification test. Please verify your code.
For reference, you program generated these results:


Not sure what is the expected result from verification step other than it builds correctly.
User avatar
Lego Haryanto
 
Posts: 4
Joined: Tue Jan 18, 2011 1:54 pm

Re: Typos trends

Postby admin » Sat Feb 19, 2011 7:16 pm

It is expected to pass the small test given in example with each puzzle.
User avatar
admin
Site Admin
 
Posts: 333
Joined: Thu Dec 23, 2010 1:27 am

Re: Typos trends

Postby Lego Haryanto » Sat Feb 19, 2011 7:52 pm

Oh, okay. Thanks.
User avatar
Lego Haryanto
 
Posts: 4
Joined: Tue Jan 18, 2011 1:54 pm

Re: Typos trends

Postby Alexey Solodovnikov » Thu Jan 05, 2012 1:43 am

The following question about the solution timing:
I have two solutions (both pass) - the second is about 3 times faster for the given testcase open5_in.txt. The times are 125 and 47 ms, but the submission time is always 0.01s :shock: Is that OK?
User avatar
Alexey Solodovnikov
 
Posts: 32
Joined: Sun Jun 26, 2011 5:54 am

Re: Typos trends

Postby warrenld » Sat Feb 18, 2012 4:01 pm

I have sent 5 attempts at this puzzle. Each passes validation and the first test case. They also give the correct output for the extended sample data (except the first 4 print 27.0 instead of 27 for the oprah s sister term; the 5th fixes that discrepancy).

However, each fails for TC 2, 3, and 4, aborting the run before trying TC 5 (because 3 TCs in a row failed), with "invalid output".

I have no idea what's wrong. I have tried changing the sorting order, so that terms with identical counts appear in alphabetical order (even though that was not specified in the problem statement), and added code to print integer-value counts as N rather than N.0, in case that was the problem (though the discussion claimed that problem had been fixed), and it always fails in the same way.

Can you give me any clues on the nature of the "invalid output"?
User avatar
warrenld
 
Posts: 2
Joined: Thu Sep 29, 2011 10:32 am

Re: Typos trends

Postby Alexey Solodovnikov » Sun Feb 19, 2012 4:38 am

warrenld wrote:Can you give me any clues on the nature of the "invalid output"?

Have you performed trim() for every input string? If yes - remove it :)
User avatar
Alexey Solodovnikov
 
Posts: 32
Joined: Sun Jun 26, 2011 5:54 am

Previous

Return to Puzzles

Who is online

Users browsing this forum: No registered users and 2 guests

cron