Skip to main content

Timeline for answer to Finding Chord Segments with Integer Length by Ajax1234

Current License: CC BY-SA 4.0

Post Revisions

12 events
when toggle format what by license comment
9 hours ago comment added Jonathan Allan 173 bytes
9 hours ago comment added Jonathan Allan The check for T in F isn't strictly necessary since you have m+n<2*r in f, it is only really there to allow the sorting, but you could replace and sorted([U,L+U])!=sorted([n,m]) with and{U,L+U}!={n,m}. EDIT: or even and{U,L+U}^{n,m}.
13 hours ago history edited Ajax1234 CC BY-SA 4.0
deleted 2 characters in body
13 hours ago comment added Ajax1234 @Neil Thank you, updated
13 hours ago history edited Ajax1234 CC BY-SA 4.0
deleted 1 character in body
23 hours ago comment added Neil I believe the intent is for X to be a parameter to your lambda.
yesterday history edited Ajax1234 CC BY-SA 4.0
deleted 677 characters in body
yesterday comment added Ajax1234 @LevelRiverSt Thank you for your comments. I believe my solution, as it stands, covers all correct cases, including some that are not included in the OP's output. I asked them for clarification, and have updated my post and TIO link to reflect this. There may be an aspect to the rules that has eluded me, so I will delete this if the OP can clarify.
yesterday history edited Ajax1234 CC BY-SA 4.0
added 158 characters in body
yesterday comment added Level River St Further note: all the additional tuples produced by this code look valid to me so I don't know why they are excluded from the test case in the question.
yesterday comment added Level River St I'm not sure why this has been downvoted, but the TIO link produces no output. I added a print(k) after the first line of the footer and it gave several tuples which are not in the test case and with r not the largest value, in addition to some correct ones. I would encourage people to point out issues rather than downvoting without explanation. It may be a mistake in uploading.
yesterday history answered Ajax1234 CC BY-SA 4.0