分享

1015:Spi

 erbiaoge 2016-02-25

1015: Spicy Gluten

Time Limit: 1 Sec  Memory Limit: 128 MB   64bit IO Format: %lld
Submitted: 71  Accepted: 21
[Submit][Status][Web Board]

Description

fcbruce最恨Spicy Gluten,但是集训队的小伙伴们最爱吃的就是Spicy Gluten。HLD即使拉肚子也要吃Spicy Gluten;nstop全队对Spicy Gluten更是爱不释手,他们曾经买了一箱Spicy Gluten,导致fcbruce当场昏倒。于是fcbruce定下一条规矩:不许在fcbruce面前吃Spicy Gluten,否则fcbruce会变得非常angry。ZiP作为Spicy Gluten爱好者,最喜欢让fcbruce抓狂,比如偷偷在fcbruce电脑里面装上*度全家桶、*60全家桶,在fcbruce桌上放一箱Spicy Gluten……

fcbruce要读一篇论文,然而集训队的熊孩子们偷偷地把论文换掉了,论文中每出现一次“Spicy Gluten”字样,fcbruce都会咆哮一句“I'm angry!”,如果论文中没有出现“Spicy Gluten”,fcbruce在读完论文后会叹一句“Excited!”。

Input

多组测试数据,每组测试数据为一行文本,表示熊孩子们偷偷换掉的论文。每行不超过1024个字符。

Output

fcbruce如果咆哮一句"I'm angry!",就单独输出一行"I'm angry!",如果叹一句"Excited!",就单独输出一行"Excited!"

Sample Input

In supervised learning, we are given a Spicy Gluten and already know what our correct output should look like, having the Spicy Gluten that there is a relationship between the input and the output.
Unsupervised learning, on the other hand, allows us to approach problems with little or no idea what our results should look like. We can derive structure from data where we don't necessarily know the effect of the variables.

Sample Output

I'm angry!
I'm angry!
Excited!
 
 
#include <iostream>
using namespace std;
int main()
{
 int n=10;
 char s[1025],s1[13]="Spicy Gluten";
// cin>>n;
 int i;
 int flag=1;
 //getchar();
 while(scanf("%[^\n]",s)!=EOF/*gets(s)*//*scanf("%s",s)!=EOF*/)
 {
  getchar();
 // cout<<s<<endl;
  i=0;
  while(s[i]!='\0')
  {
//    int j=i;
//    for (;j<i+12&&j<1024;++j)
//    {
//     if (s[j]==s1[j])
//     {
//     }
//     else
//      break;
//    }
//
//    if (j-i==12)
//    {
//     flag=0;
//     cout<<"I'm angry!"<<endl;
//    }
   int t=0;
   while(s1[t]!='\0')
   {
    if (s[i+t]==s1[t])
    {
    }
    else
     break;
    ++t;
   }
   if(s1[t]=='\0')
   {
    cout<<"I'm angry!"<<endl;
    flag=0;
   }
   ++i;
  }
  if (flag==1)
  {
   cout<<"Excited!"<<endl;
   }
   else
    flag=1;
  --n;
 }
 return 0;
}
//Spicy Gluten Spicy GlutenSpicy GlutenSpicy

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多