Exchange effect on alloy formation of Co/Ag/Pt(111) ultrathin films