find anagrams by inaniwa

#include<string.h>\x0d
char c[9],s[9],t[9];\x0d
main(){\x0d
 scanf("%s",&s);\x0d
 qsort(s,strlen(s),1,strcmp);\x0d
 for(;~scanf("%s",&c);){\x0d
  strcpy(t,c);\x0d
  qsort(c,strlen(c),1,strcmp);\x0d
  if(strcmp(c,s)==0){\x0d
   printf("%s\n",t);\x0d
  }\x0d
 }\x0d
}\x0d

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page