Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
9
  • 2
    \$\begingroup\$ The current input spec could be abused. I could specify that a triangle should be specified as [[0,0,1,0],[0,1,0,1],[1,0,1,0,1]] for example, and so avoid the need to encode the triangle within code. Or is that ok? \$\endgroup\$ Commented Oct 26, 2019 at 7:55
  • 1
    \$\begingroup\$ Actually, scratch that, I found a way more abusive solution: eval. The four distinct inputs just define functions which format the four shapes. @cairdcoinheringaahing, I recommend scoring as length(code)+length(indicators); or restrict indicator to one character. \$\endgroup\$ Commented Oct 26, 2019 at 12:53
  • 9
    \$\begingroup\$ However, I'd expect the community to downvote answers which violate the spirit of the challenge, such as an answer that uses that "loophole", and I certainly would downvote such a boring answer I really do not think that we should downvote an answer to a code golf question that is both golfed and fits the defined spec! \$\endgroup\$ Commented Oct 26, 2019 at 13:29
  • 3
    \$\begingroup\$ It’s unclear, and subjective, to refer to the "spirit" of the challenge. I think it’s better to have a clear spec as to what’s allowed and what’s not \$\endgroup\$ Commented Oct 26, 2019 at 14:41
  • 1
    \$\begingroup\$ @Arnauld The < and > characters didn't work with the <pre> tags. Updated to fix that \$\endgroup\$ Commented Oct 27, 2019 at 0:54

AltStyle によって変換されたページ (->オリジナル) /