Screen Shot 2012-12-12 at 2.19.31 PM

Screen Shot 2012-12-12 at 2.19.31 PM

6 responses to “Screen Shot 2012-12-12 at 2.19.31 PM

  1. int test(const char *str1, const char *str2){ printf( test for [%s] and [%s] , str1, str2); if(str1 == 0 || str2 == 0) { rteurn 0; } int nBase[26] = {0}; while(*str1 != 0) { int nIndex = (*str1 A’ > 25) ? (*str1 a’) : (*str1 A’); nBase[nIndex] = 1; str1++; } while(*str2 != 0) { int nIndex = (*str2 A’ > 25) ? (*str2 a’) : (*str2 A’); if(nBase[nIndex] == 0) { rteurn 0; } str2++; } rteurn 1;}int _tmain(int argc, _TCHAR* argv[]){ printf( result is %d\n , test( ABCDEFGHLMNOPQRS , DCGSRQPOM )); printf( result is %d\n , test( ABCDEFGHLMNOPQRS , DCGSRQPOZ )); printf( result is %d\n , test( abcdefghlmnopqrs , DCGSRQPOM )); printf( result is %d\n , test( ABCDEFGHLMNOPQRS , dcgsrqpoz )); rteurn 0;}

  2. gcc versiongcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3Copyright (C) 2009 Free Software Foundation, Inc.This is free sarwtofe; see the source for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.回复

  3. The ability to think like that is always a joy to behold

  4. I’m impressed you should think of something like that

  5. gcc –versiongcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3Copyright (C) 2009 Free Software Foundation, Inc.This is free software; see the soruce for copying conditions. There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.回复

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s