import Data.List (sortBy)
import Data.Function
list = [("2^n" , (2**))
,("2^log(n)" , (2**) . log) ,("4^n" , (4**))
,("n^2" , (^2))
,("n*log(n)" , (*) =<< log)
aW1wb3J0IERhdGEuTGlzdCAoc29ydEJ5KQppbXBvcnQgRGF0YS5GdW5jdGlvbgoKbGlzdCA6OiBbKFN0cmluZywgRG91YmxlIC0+IERvdWJsZSldCmxpc3QgPSBbKCIyXm4iICAgICAgICAgICwgKDIqKikpCiAgICAgICAsKCIyXmxvZyhuKSIgICAgICwgKDIqKikgLiBsb2cpCiAgICAgICAsKCI0Xm4iICAgICAgICAgICwgKDQqKikpCiAgICAgICAsKCJuIiAgICAgICAgICAgICwgaWQpCiAgICAgICAsKCJuXjIiICAgICAgICAgICwgKF4yKSkKICAgICAgICwoIm4hIiAgICAgICAgICAgLCBwcm9kdWN0IC4gZW51bUZyb21UbyAxKQogICAgICAgLCgibipsb2cobikiICAgICAsICgqKSA9PDwgbG9nKQogICAgICAgLCgibG9nKG4hKSIgICAgICAsIGxvZyAuIHByb2R1Y3QgLiBlbnVtRnJvbVRvIDEpCiAgICAgICAsKCJsb2cobG9nKG4pKSIgICwgbG9nIC4gbG9nKQogICAgICAgLCgic3FydChsb2cobikpIiAsIHNxcnQgLiBsb2cpXQoKbWFpbiA6OiBJTyAoKQptYWluID0gbWFwTV8gcHJpbnQgJCByZXZlcnNlICQgc29ydEJ5IChjb21wYXJlIGBvbmAgc25kKSAkIG1hcCAoZm1hcCAoJDEwKSkgbGlzdAo=
("n!",3628800.0)
("4^n",1048576.0)
("2^n",1024.0)
("n^2",100.0)
("n*log(n)",23.025850929940457)
("log(n!)",15.104412573075516)
("n",10.0)
("2^log(n)",4.933409667914597)
("sqrt(log(n))",1.5174271293851465)
("log(log(n))",0.834032445247956)