McCarthy's strong outing lifts Arizona over Giants