Johnny Cueto went the distance Wednesday and Hunter Pence's two-run bomb gave the Giants what they needed to claim a win over the Padres.