2016-08-17 Problem Solving►UVa UVa 11734 - Big Number of Teams will Solve This Contents 1. Problem2. Solution3. Code Problem中文網址 Solution如下~ CodeUVa 117341234567891011121314151617181920212223242526272829303132333435363738394041424344#include<cstdio>#include<cstring>int main(){ int Case; char str1[100], str2[100]; scanf("%d", &Case); getchar(); for (int c = 1; c <= Case; c++) { fgets(str1, 100, stdin); fgets(str2, 100, stdin); int i, j, len1 = strlen(str1) - 1; bool wrong = false, format = true; for (i = 0, j = 0; i < len1; i++) if (str1[i] == str2[j]) j++; else if (str2[j] == ' ') { j++; i--; wrong = true; } else if (str1[i] != ' ') { format = false; wrong = true; break; } else//str1[i]==' ' wrong = true; printf("Case %d: ", c); if (!wrong) puts("Yes"); else if (format&&j == strlen(str2) - 1) puts("Output Format Error"); else puts("Wrong Answer"); } return 0;} Newer Machine Learning Foundations - L5 Notes(下) Older UVa 12700 - Banglawash