More than 300 people have died in Pakistan after days of relentless monsoon rains triggered floods and landslides.