Sweeping floods have killed at least 28 people in north-west Pakistan while parts of China and North Korea have also been affected.