select m randomly from n integers