方法就是构造一个CSTRING类,如下: 速度提高很大,真的!!!!!!!!!TLE -> AC struct cstring...{ char s[50]; friend bool operator<(cstring a,cstring b) ...{ return strcmp(a.s,b.s) < 0; } friend bool operator>(cstring a,cstring b) ...{ return strcmp(a.s,b.s) > 0; }}; map<cstring ,int > m;cstring cs;scanf("%s",cs.s);m[cs] = 1;