Post History
BQN, 18 bytesSBCS 'A'-¬⊸⌊2×13-˜⌜○↕14 Run online! This solution computes a table of c-r, where r is the row number and c is the column number, so that the first row is 0 1 2… and the first colu...
Answer
#1: Initial revision
# [BQN](https://mlochbaum.github.io/BQN/), 18 bytes<sup>[SBCS](https://github.com/mlochbaum/BQN/blob/master/commentary/sbcs.bqn)</sup> ``` 'A'-¬⊸⌊2×13-˜⌜○↕14 ``` [Run online!](https://mlochbaum.github.io/BQN/try.html#code=J0EnLcKs4oq44oyKMsOXMTMty5zijJzil4vihpUxNA==) This solution computes a table of `c-r`, where `r` is the row number and `c` is the column number, so that the first row is `0 1 2…` and the first column is `0 ¯1 ¯2…`. After this it maps non-positive numbers `0 ¯1 ¯2…` to `A C E…`, and positive ones `1 2…` to `B D…`, using the arithmetic expanded below. BQN's [extension](https://mlochbaum.github.io/BQN/doc/logic.html) of boolean negation `¬` to mean one minus the argument is helpful here. ``` 'A'-¬⊸⌊2×13-˜⌜○↕14 13 14 # Numbers ○↕ # Range of each -˜⌜ # Subtract-from table 0 ¯1 ¯2 / 1 2 2× # Times two 0 ¯2 ¯4 / 2 4 ¬⊸ # 1 minus, then… 1 3 5 / ¯1 ¯3 ⌊ # Minimum with original 0 ¯2 ¯4 / ¯1 ¯3 'A'- # Subtract from 'A' A C E / B D ```