Timeline for Crop ASCII Art Challenge
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 14, 2018 at 16:12 | comment | added | ngn |
oops... I forgot about the third case, sorry. Then maybe: ⊃{⌽⊖⍵↓⍨⊃⍸⍺=⍵}/⎕⎕⎕ (sic, with 3 trailing quads) which is even shorter. Or ... ⎕⎕(↑⎕) if a pre-mixed matrix is not allowed.
|
|
Sep 14, 2018 at 15:21 | comment | added | Uriel | @ngn OP said number of characters differs between lines so I assumed input should be vector before processing. Even so, I need the selection parts (first and rotate) in case the delimiter shows a few times (see third test case), but I guess the drop does cut a few bytes, so thanks! I'll update once I get to PC | |
Sep 14, 2018 at 11:45 | comment | added | ngn |
(⍸a=⎕)↓(1+⍸a=⎕)↑a←⎕ with ⎕io←0
|
|
Sep 14, 2018 at 11:31 | comment | added | ngn |
too complicated. you could accept a matrix instead of vector of vectors, find the two positions with ⍸matrix∊separators , and do take/drop with them
|
|
Sep 13, 2018 at 18:15 | history | edited | Uriel | CC BY-SA 4.0 |
added 43 characters in body
|
Sep 13, 2018 at 18:10 | history | answered | Uriel | CC BY-SA 4.0 |