标签:des style color os 数据 width
so soon river goes them got moon begin big 0
Yes.Harry 可以念这个咒语:"big-got-them".HintHint
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int mp[50][50]; char str[10]; bool flag; void dfs(int x) { if(x==12) { flag=true; return ; } if(flag) return ; for(int i=0;i<26;i++) { if(mp[x][i]) { mp[x][i]=0; dfs(i); mp[x][i]=1; } } } int main() { while(~scanf("%s",str)) { memset(mp,0,sizeof(mp)); int x=str[0]-'a'; int y=str[strlen(str)-1]-'a'; mp[x][y]=1; while(scanf("%s",str)&&str[0]!='0') { int x=str[0]-'a'; int y=str[strlen(str)-1]-'a'; mp[x][y]=1; } flag=false; dfs(1); if(flag) printf("Yes.\n"); else printf("No.\n"); } return 0; }但是=-=卧槽围观10行就过的大神=-=
main(){ int k=1; char s[100]; while(scanf("%s",s)==1){ while(scanf("%s",s)&&s[0]!='0'); if(k==1)printf("Yes.\n"); else printf("No.\n"); k++; } }
标签:des style color os 数据 width
原文地址:http://blog.csdn.net/u013582254/article/details/38069525