Matt Tearle
1109
1109
Rank18
18
Badges2018
2018
Score
Matt Tearle submitted a Comment to Problem 55985. Generate Tribonacci Sequence Thanks, Marco. Added that.
on 23 Feb 2024 |
Matt Tearle submitted a Comment to Problem 56190. Split Even Number Into Two Primes Thanks for that catch, Filip. I added the ordering to the problem description.
on 23 Feb 2024 |
Matt Tearle submitted Problem 56543. Cricket - Is It LBW? to Community on 16 Aug 2023 |
Matt Tearle submitted Problem 56518. Cricket - Report the Result (Part I: Limited Overs) to Community on 13 Aug 2023 |
Matt Tearle submitted Problem 56513. Cricket - Peak Batting Average to Community on 7 Aug 2023 |
Matt Tearle submitted Problem 56508. Cricket - Represent Average in "Dulkars" and "Ses" to Community on 7 Aug 2023 |
Matt Tearle submitted Problem 55225. Simpson's Paradox - Calculate correlation coefficients for groups of data to Community on 4 Aug 2023 |
Matt Tearle submitted a Comment to Problem 56538. Cricket - Report the Result (Part II: Test Matches) "The test cases are all real matches, so they are correct", I said overconfidently, overlooking my ability to make stupid copy-paste errors! :)
Thanks again, Rafael for helping find that bug in the tests. You're right that #11 is incorrect - I left off the "(f/o)" on England's second innings. Without it, the score doesn't make any sense because England had more runs, but are all out in what would be the 4th innings, which is impossible. I'll update the test but won't rescore the solutions, so your answers will stand as correct (I don't want to risk breaking your hard work for my mistake).
Your interpretation of test #2 is correct. India batted once. Australia is behind on runs but their second innings is still in progress, so it's a draw.
@Christian: you're right that if you assume the scores have been recorded correctly, you don't need to look for the follow-ons for the MATLAB to work correctly. If you're looking to figure out if an innings is completed, then the "d" after the "/w" is important - I'm guessing that's what you used it for. But you can also shortcut that. When I said declarations don't affect the result, I meant the way the result is reported ("n wickets" or "n runs") - in the table, "___" could mean 123 or 123/4d.
Glad you enjoyed the problems, despite not understanding the subject matter! Maybe that was part of the challenge?
on 13 Nov 2022 |
Matt Tearle submitted a Comment to Problem 56538. Cricket - Report the Result (Part II: Test Matches) Tip: you can ignore ties, so you can get the total scores for both teams and one will be higher than the other. That gives you a "provisional winner" and "loser". That's when the last paragraph (about a result vs a draw) kicks in: unless the "losing" team has completed both innings, it's a draw. That means you need to figure out a way to tell if that has happened. (Hint: the first innings must have been completed if there's a second one; the second innings would only be completed if all 10 wickets have been taken*). If it's not a draw, then the result will be one of the options in the table.
[*] A declaration also completes the innings, but declaring your second innings while you're still losing would be suicide, so that will never occur. Hence, a (non-draw) result occurs only if the "losing" team is all out in their second innings. How to figure out if a team is all out is given in the second paragraph.
on 12 Nov 2022 |
Matt Tearle submitted a Comment to Problem 56538. Cricket - Report the Result (Part II: Test Matches) Thanks, Rafael for all your feedback. It's helpful to get a "cricket outsider's" insights. The last two problems of the set were intended to be challenging, and it's blowing my mind that the first two people to finish them did so with no cricket knowledge! Well done.
I'm trying to walk a line between not giving enough information and making it impossible for those who don't have the cricket background, and giving too much information and thus giving away the solution. In this problem, use the table as your guide to determining results (other than a draw). Notice that declarations don't appear in the table - they don't have any effect on the result. I mentioned them in the problem description because I didn't want people to make assumptions about the formatting (like: the scores will always end with a numeric digit) and base their string/regexp/pattern approach on those incorrect assumptions. Follow-ons change the order of the innings, so do have some effect - again, follow the table - but there's no requirement that either declarations or follow-ons occur. See the first code example for one that has nothing but simple scores.
It's entirely possible that something in my description is incorrect or misleading. The test cases are all real matches, so they are correct. If you think a test case doesn't match the description, let me know and I can either correct the description or add some explanation. (The conventions here *are* weird. That's cricket for you.)
on 12 Nov 2022 |
Matt Tearle submitted a Comment to Problem 56543. Cricket - Is It LBW? Thanks, Rafael, for adding the extra info. I didn't want to bloat the instructions with too much detail - to be honest, I didn't expect so many non-cricket-familiar people to try these problems!
Tip #3 (FPNIC): an image search for "lbw review" should bring up plenty of examples of how it looks in reality, with the graphics they overlay on the television coverage. That's roughly what I was channeling when I made the diagrams in the problem statement. (I don't want to include actual images in case I violate any copyright by accident.)
on 11 Nov 2022 |
Matt Tearle submitted a Comment to Problem 56533. Cricket - You Miss, I Hit (Rank Bowlers by Proportion of Bowled and LBW Wickets) @Raphael: Thank you for catching that - I was tweaking the example and didn't update the image correctly. I have now.
To clarify: Raphael is correct that "caught and bowled" does *not* count to the "bowled" category. And yes, in the example, if Ned's second wicket was "bowled" or "lbw" instead of "caught and bowled", then he would have WWProp = 0.5 and should be included as the last row of the output table, having at least 2 wickets and a proportion of at least 0.5.
on 11 Nov 2022 |
Matt Tearle received Famous badge on 10 Nov 2022 |
Matt Tearle submitted Problem 56528. Cricket - Most Frequent Bowler-Batter Wicket Combinations to Community on 8 Nov 2022 |
Matt Tearle submitted Problem 56538. Cricket - Report the Result (Part II: Test Matches) to Community on 8 Nov 2022 |
Matt Tearle submitted Problem 56533. Cricket - You Miss, I Hit (Rank Bowlers by Proportion of Bowled and LBW Wickets) to Community on 8 Nov 2022 |
Matt Tearle submitted Problem 56503. Cricket - Career Bowling Statistics to Community on 8 Nov 2022 |
Matt Tearle submitted Problem 56498. Cricket - Career Batting Statistics to Community on 8 Nov 2022 |
Matt Tearle submitted Problem 56493. Cricket - How Much More to Beat Bradman? to Community on 8 Nov 2022 |
Matt Tearle submitted Problem 56483. Cricket - Average Partnership Contribution to Community on 8 Nov 2022 |
Matt Tearle submitted Problem 56523. Cricket - Sort Batters by Distance Run to Community on 8 Nov 2022 |
Matt Tearle submitted a Comment to Solution 9690613 @Lev: the line "combo=combo+1;" means that in some cases, the output can be > 1. All the other test cases just force-converted to logical so any nonzero numeric return will be T and 0 will be F. Test 20, however, actually checks against another logical, so the numerical return (>1) fails. The problem states that the function should return logical T/F, so there should probably be a test specifically for that.
on 8 Nov 2022 |
Matt Tearle submitted a Comment to Problem 56175. Dartboard Average II @Dyuman Joshi: thanks, good catch. I've added that to the description.
on 25 Oct 2022 |
Matt Tearle submitted a Comment to Solution 9428338 @Jason Friedman: good suggestion. I've added some example code that should help.
on 24 Oct 2022 |
Matt Tearle submitted a Comment to Problem 55250. Find the minimum of the column-maximums of a matrix @Neha Shaah: how so? If the input is a row vector, the column maximums will be the elements themselves. Hence the minimum will be the minimum of the input vector itself.
on 24 Oct 2022 |
Matt Tearle submitted a Comment to Solution 9206550 I don't understand the comments about exp(1). "e" (exp(1)) is listed as one of the constants in the problem statement. Its value is 2.7183... So an input of 2.5 should return e, as shown in the examples (being closer to 2.5 than sqrt(2) = 1.414...)
on 24 Oct 2022 |
Matt Tearle submitted Solution 9592203 to Problem 55230. Find Closest Constant on 24 Oct 2022 |
Matt Tearle submitted Solution 9592078 to Problem 56200. Triangle Coordinates on 24 Oct 2022 |
Matt Tearle submitted Solution 9592068 to Problem 56288. Angle Between Analog Clock Hands on 24 Oct 2022 |
Matt Tearle submitted Solution 9592018 to Problem 56180. Boustrophedon on 24 Oct 2022 |
Matt Tearle submitted Solution 9591963 to Problem 55260. Create block matrix of integers (j+k-1) - Part II on 24 Oct 2022 |
Matt Tearle submitted Solution 9591873 to Problem 55255. Create block matrix of integers (j+k-1) - Part I on 24 Oct 2022 |
Matt Tearle submitted Solution 9591858 to Problem 56175. Dartboard Average II on 24 Oct 2022 |
Matt Tearle submitted Solution 9591853 to Problem 56170. Dartboard Average I on 24 Oct 2022 |
Matt Tearle submitted Solution 9591833 to Problem 56170. Dartboard Average I on 24 Oct 2022 |
Matt Tearle submitted Solution 9591793 to Problem 56195. Possible Rugby Scores on 24 Oct 2022 |
Matt Tearle submitted Solution 9591753 to Problem 56190. Split Even Number Into Two Primes on 24 Oct 2022 |
Matt Tearle received Leader badge for Solution 9591728 on 24 Oct 2022 |
Matt Tearle submitted Solution 9591728 to Problem 56283. Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits) on 24 Oct 2022 |
Matt Tearle submitted Solution 9591718 to Problem 56283. Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits) on 24 Oct 2022 |
Matt Tearle submitted Solution 9591673 to Problem 56185. Extract the Acrostic Message on 24 Oct 2022 |
Matt Tearle submitted Problem 56288. Angle Between Analog Clock Hands to Community on 24 Oct 2022 |
Matt Tearle received Puzzler badge on 24 Oct 2022 |
Matt Tearle submitted Problem 56283. Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits) to Community on 24 Oct 2022 |
Matt Tearle submitted Problem 55260. Create block matrix of integers (j+k-1) - Part II to Community on 24 Oct 2022 |
Matt Tearle submitted Problem 55255. Create block matrix of integers (j+k-1) - Part I to Community on 24 Oct 2022 |
Matt Tearle submitted Problem 56175. Dartboard Average II to Community on 24 Oct 2022 |
Matt Tearle submitted Problem 56170. Dartboard Average I to Community on 24 Oct 2022 |
Matt Tearle submitted Problem 56195. Possible Rugby Scores to Community on 24 Oct 2022 |
Matt Tearle submitted Problem 55780. Calculate Angle From Axis to Community on 17 Oct 2022 |