ben
2019-12-1 15:17:32

There are numbers next to the names on the leaderboard (eg the 22 in 1) 22 * yfzhe). What do those mean?


yfangzhe
2019-12-1 17:30:29

Something like scores?


samdphillips
2019-12-1 17:37:54

Those are the scores. The first person to complete a puzzle gets 2*num_entrants points, the next person gets 2 less, and so on. If you only complete half the puzzle you get half the points. Scores are recalculated when people enter/leave the leaderboard.


slack1
2019-12-1 18:14:24

@slack1 has joined the channel


slack1
2019-12-1 18:48:18

(def FILE "../data/1.txt") (def data (~>> FILE file->lines (map string->number))) ;; ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ;; Solve (fn (step n) (~> n (quotient _ 3) (- 2))) (fn (score n) (apply + (unfold negative? identity step (step n)))) (def A (~>> data (map step) (apply +))) (def B (~>> data (map score) (apply +)))


samdphillips
2019-12-1 19:31:32

If you are using threading you can remove some of those _ by using ~>>


slack1
2019-12-1 19:44:41

ohh thanks


yfangzhe
2019-12-1 19:48:32

And you can replace (* 1/3) floor with (quotient _ 3).


dan
2019-12-2 02:12:49

@dan has joined the channel


samdphillips
2019-12-2 05:59:14

The difficulty increased a bit from yesterday :stuck_out_tongue:


yfangzhe
2019-12-2 06:14:25

and increased from last year, IMHO


samdphillips
2019-12-2 07:48:22

Here are the total completion stats: https://adventofcode.com/2019/stats