Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我的16ms啊,怎么搞成0ms 啊。我实在是想不到#include <stdio.h> char s[100001]; char t[100001]; bool s_in_t( char *s ,char *t) { for ( ; *s ; s++) { for ( ; *t && *s != *t ; t++); if ( !*t) break; else t++; } if ( *s ) { return false; } return true; } int main(void) { while ( scanf("%s%s" , s ,t) != EOF ) { if (s_in_t( s , t )) { printf("Yes\n"); } else { printf("No\n"); } } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator