标签:结果 namespace bottom title 结束 php panel 没有 blank
http://acm.hdu.edu.cn/showproblem.php?pid=2094
#include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 10; char win[1111][1111], loser[1111][1111], temp[55]; int main() { int T; while(~scanf("%d", &T)) { if(T == 0) break; for(int i = 1; i <= T; i ++) { scanf("%s %s", win[i], loser[i]); } int cnt = 0, ans = 0, flag=1; for(int i = 1; i <= T; i ++) { cnt = 0; for(int j = 1; j <= T; j ++) { if(strcmp (win[i], loser[j])!=0) cnt++; } if(cnt == T) { if(flag == 1) { flag = 0; strcpy(temp, win[i]); ans ++; } else if(strcmp(temp, win[i])!=0) ans ++; } } if(ans == 1) printf("Yes\n"); else printf("No\n"); } return 0; }
标签:结果 namespace bottom title 结束 php panel 没有 blank
原文地址:https://www.cnblogs.com/zlrrrr/p/9380191.html