Comment detail

データの整列 (Nested Flatten)

やっつけコード。

1
2
let dict_sort = List.sort (fun (x1,x2) (y1,y2) -> match x1 - y1 with 0 -> x2 - y2 | d -> d);;
let dist_sort = List.sort (fun (x1,x2) (y1,y2) -> (x1*x1 + x2*x2) - (y1*y1 + y2*y2));;

Index

Feed

Other

Link

Pathtraq

loading...