about summary refs log tree commit diff stats
ModeNameSize
-rw-r--r--.hgtags857log stats plain blame
-rw-r--r--LICENSE1192log stats plain blame
-rw-r--r--Makefile1542log stats plain blame
-rw-r--r--README1088log stats plain blame
-rw-r--r--client.c9060log stats plain blame
-rw-r--r--config.arg.h2681log stats plain blame
-rw-r--r--config.default.h2576log stats plain blame
-rw-r--r--config.mk472log stats plain blame
-rw-r--r--draw.c4669log stats plain blame
-rw-r--r--dwm.13247log stats plain blame
-rw-r--r--dwm.h7585log stats plain blame
-rw-r--r--dwm.png373log stats plain blame
-rw-r--r--event.c7996log stats plain blame
-rw-r--r--main.c7611log stats plain blame
-rw-r--r--tag.c2557log stats plain blame
-rw-r--r--util.c1222log stats plain blame
-rw-r--r--view.c5573log stats plain blame
"n">acc (group: HashSet<string>) -> acc || group.Contains(origin)) false groups let () = let pipes = new Dictionary<string, list<string>>() File.ReadAllLines "day12.txt" |> Array.map getConnection |> Array.iter (fun (head, tail) -> pipes[head] <- tail) let reachable = new HashSet<string>() visit pipes reachable "0" printfn "%A" reachable.Count let groups = new List<HashSet<string>>() for origin in pipes.Keys do if checkInGroups groups origin then () else let newGroup = new HashSet<string>() visit pipes newGroup origin groups.Add(newGroup) printfn "%A" groups.Count