#include <stdio.h> int main() { int ip[4]={0}; int mk[4]={0}; char str[50]; int mask; int sum[7]={0}; int i,len; int tail_ip[]={126,191,223,239,255}; while(scanf("%s",str)!=EOF) { len=sscanf(str,"%d.%d.%d.%d~%d.%d.%d.%d",ip,ip+1,i...