codeforces 312A.Whose sentence is it?

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
#define ll long long
#define ls rt<<1
#define rs ls1
#define lson l,mid,ls
#define rson mid+1,r,rs
#define middle (l+r)>>1
#define eps (1e-9)
#define type int
#define clr_all(x,c) memset(x,c,sizeof(x))
#define clr(x,c,n) memset(x,c,sizeof(x[0])*(n+1))
#define MOD 1000000007
#define inf 100000007
#define pi acos(-1.0)
#define M 200000+5
int main(){
    int T,t,i,j,f1,f2;
char s[105],s2[7];
    while(~scanf("%d",&T)){
getchar();
while(T--){
gets(s); 
f1=0;f2=0;
t=strlen(s);
for(i=0;i<5;i++)s2[i]=s[i];
s2[i]='\0';
if(strcmp(s2,"miao.")==0)f1=1;
for(i=t-5,j=0;j<5;i++,j++)s2[j]=s[i];
s2[j]='\0';
if(strcmp(s2,"lala.")==0)f2=1;
if(f1==1&&f2==0)puts("Rainbow's");
else if(f1==0&&f2==1)puts("Freda's");
else puts("OMG>.< I don't know!");
}
}
    return 0;
}

你可能感兴趣的:(水题,coderforce)