much faster implementation for uva 11057 - using set (online sort), and as set is a binary tree - the search is naturally binary, instead of linear search, used in previous implementation