Pick t carefully (how?) so that it depends only on gamma. Let m be the total number of samples taken until we see t pairwise collisions. Output something (what?) that depends on m and t.
see another hint...