« first day (260 days earlier)      last day (2397 days later) » 

Ven
2:11 PM
Back to it. Found `(u⍸t){+/⍵}⌸x` in the docs as an interesting idiom... I guess I'll put off using `⊆`, because it seems like this way of using `key` is better.
It also means I don't need to `grade` anymore, this way.
It however seems as if I''ll still have to "pad" the keys and value, and remove `1` from the tally when replicating.
I think that last tidbit is the part that bugs me the most. it really feels as if I shouldn't have to do that: it really looks like a hack. But key doesn't requires both sides to have the same tally...
Ah; no; I still need to sort – otherwise I can't guarantee the output order.
 
Ven
2:25 PM
g←⊢⍸⍨⌊/+(⍳10)×10÷⍨(1+⌈/-⌊/)
v←(⎕AVU/⍨⎕AVU>1E3)
⎕←((g v),⍳10){(¯1+≢⍵)/'⌸'}⌸v[⍋v],⍳10
That..."works", if only for a tiny, tiny detail: It's not sorted correctly...
Almost!
g←⊢⍸⍨⌊/+(⍳10)×10÷⍨(1+⌈/-⌊/)
v←(⎕AVU/⍨⎕AVU>1E3)
⎕←((⍳10),g v){(¯1+≢⍵)/'⌸'}⌸(⍳10),v
Now, it's "just" missing one column at the beginning :D everything else is good
....Guess I can change g to be ⍳9, and prepend a 0 as a "catch-all"...
...Now I pass two test cases \o/
 
Ven
3:02 PM
I settled for (¯1+⍳10)×10÷⍨(1+⌈/-⌊/), which passes the same amount of test cases, but without the hack
 

« first day (260 days earlier)      last day (2397 days later) »