/*
* 解題思路:
* 經典的字母重排問題,忽略大小寫的比較,如果輸入沒有該單詞對應的其他重排單詞,則原單詞輸出
*/
#include#include #include #include #define A 1000 char s1[ A ][ A ],s2[ A ][ A ]; char s3[ A ][ A ]; int p,q; int cmp_char( const void *_a , const void *_b ) { char *a = (char * )_a; char *b = (char* )_b; return *a-*b; } int cmp_string( const void *_a , const void *_b ) { char * a = (char *)_a; char *b = (char * )_b; return strcmp( a , b ); } int search( int x ) { int i,j; for( i=0;i