lge code jam Problem1 : not completed

using set. it uses less memory but more time