UVA 11734 Big Number of Teams will Solve This

大水题,不解释啦!

 1 #include<cstdio>
 2 #include<cstring>
 3 #define maxn 50
 4 using namespace std;
 5 
 6 char s[maxn],t[maxn];
 7 
 8 int main()
 9 {
10     int tt,ca=1;
11     scanf("%d",&tt);
12     getchar();
13     while(tt--)
14     {
15         gets(s);
16         gets(t);
17         int l1=strlen(t);
18         int l2=strlen(s);
19         int j=0;
20         bool flag=1;
21         for(int i=0;i<l2;i++)
22         {
23             if(s[i]==t[j])j++;
24             else flag=0;
25         }
26         printf("Case %d: ",ca++);
27         if(j!=l1)puts("Wrong Answer");
28         else
29         {
30             if(flag==0)puts("Output Format Error");
31             else puts("Yes");
32         }
33     }
34     return 0;
35 }
View Code
原文地址:https://www.cnblogs.com/yours1103/p/3422393.html