【链接】 链接

【题意】

告诉你每句话;
然后每句话是谁说的和开头与结尾的一段字符串有关。

【题解】

一个一个判断就好;
注意大小

【错的次数】

在这里输入错的次数

【反思】

在这里输入反思

【代码】

#include <bits/stdc++.h>
#define ll long long
using namespace std; int n,len;
char s[200]; bool check1()
{
int j = 1;
int now = 0;
string ts="";
for (int j = 1;j <= 5;j++)
{
if (now > len-1) return false;
ts += s[now++]; }
if (ts=="miao.")
return true;
return false;
} bool check2()
{
int j = 1;
int now = len-1;
string ts="";
for (int j = 1;j <= 5;j++)
{
if (now-5+j<0) return false;
ts += s[now-5+j];
}
if (ts=="lala.")
return true;
return false;
} int main()
{
//freopen("F:\\rush.txt","r",stdin);
scanf("%d",&n);
getchar();
for (int i = 1;i <= n;i++)
{
cin.getline(s,200);
len = strlen(s);
bool be = check1();
bool en = check2();
if (be && en)
puts("OMG>.< I don't know!");
else
if (be)
puts("Rainbow's");
else
if (en)
puts("Freda's");
else
puts("OMG>.< I don't know!");
}
return 0;
}

【Codeforces Round #185 (Div. 2) A】 Whose sentence is it?的更多相关文章

  1. 【Codeforces Round #185 (Div. 2) D】Cats Transport

    [链接] 链接 [题意] 有n座山,m只猫. 每只猫都在其中的一些山上玩. 第i只猫在h[i]山上玩,且会在t[i]时刻出现在山脚下(然后就一直在那里等) 然后有p个人. 它们听从你的安排. 在某个时 ...

  2. 【Codeforces Round #185 (Div. 2) C】The Closest Pair

    [链接] 链接 [题意] 让你构造n个点,去hack一种求最近点对的算法. [题解] 让x相同. 那么那个剪枝就不会起作用了. [错的次数] 在这里输入错的次数 [反思] 在这里输入反思 [代码] # ...

  3. 【Codeforces Round #185 (Div. 2) B】Archer

    [链接] 链接 [题意] 在这里输入题意 [题解] 概率水题. 枚举它是第几轮成功的. 直到满足精度就好 [错的次数] 1 [反思] long double最让人安心. [代码] #include & ...

  4. 【Codeforces Round #432 (Div. 1) B】Arpa and a list of numbers

    [链接]h在这里写链接 [题意] 定义bad list是一个非空的.最大公约数为1的序列.给定一个序列,有两种操作:花费x将一个元素删除.花费y将一个元素加1,问你将这个序列变为good list所需 ...

  5. 【Codeforces Round #420 (Div. 2) C】Okabe and Boxes

    [题目链接]:http://codeforces.com/contest/821/problem/C [题意] 给你2*n个操作; 包括把1..n中的某一个数压入栈顶,以及把栈顶元素弹出; 保证压入和 ...

  6. 【Codeforces Round #420 (Div. 2) B】Okabe and Banana Trees

    [题目链接]:http://codeforces.com/contest/821/problem/B [题意] 当(x,y)这个坐标中,x和y都为整数的时候; 这个坐标上会有x+y根香蕉; 然后给你一 ...

  7. 【Codeforces Round #420 (Div. 2) A】Okabe and Future Gadget Laboratory

    [题目链接]:http://codeforces.com/contest/821/problem/A [题意] 给你一个n*n的数组; 然后问你,是不是每个位置(x,y); 都能找到一个同一行的元素q ...

  8. 【Codeforces Round #423 (Div. 2) C】String Reconstruction

    [Link]:http://codeforces.com/contest/828/problem/C [Description] 让你猜一个字符串原来是什么; 你知道这个字符串的n个子串; 且知道第i ...

  9. 【Codeforces Round #423 (Div. 2) B】Black Square

    [Link]:http://codeforces.com/contest/828/problem/B [Description] 给你一个n*m的格子; 里面包含B和W两种颜色的格子; 让你在这个格子 ...

随机推荐

  1. linux命令行打开图片

    1.用预装的eog eog a.jpg 2.安装 imagemagick display a.jpg

  2. CMDB学习之四 ——DEBUG模式

    定义一个debug,进行解析调试,到测试文件 配置文件,配置debug模式,定义环境变量, #!/usr/bin/env python # -*- coding:utf-8 -*- import os ...

  3. 今日SGU 5.1

    SGU 100 题意: 普通的a+b #include<bits/stdc++.h> #define de(x) cout<<#x<<"="&l ...

  4. ZOJ 3524 Crazy Shopping

    Crazy Shopping Time Limit: 3000ms Memory Limit: 65536KB This problem will be judged on ZJU. Original ...

  5. hive load文件第一个字段为NULL

    在hive中,通常须要载入外部数据源.load文件时.第一个字段会出现NULL. 比如: 1.运行load语句: LOAD DATA LOCAL INPATH 'test.txt' OVERWRITE ...

  6. [PWA] Deal with caches in PWA

    The takeway is to know when we should cache the content? When we should clean the caches? 1. When sh ...

  7. linux 配置IP地址

    linux 配置IP网址能够使用neat,netconfig,ifconfig等进行配置,当中前两个实用户界面,第三个命令仅仅是暂时设置IP,机器重新启动后配置将丢失. 有时候图形用户界面的程序难以获 ...

  8. excel表如何实现多if选择结构多分支判断

    excel表如何实现多if选择结构多分支判断 一.总结 一句话总结:把多if分支转换成单if分支相加. 也可以if分支,也可以lookup函数. 1.CHOICE: +2 if band A; +1 ...

  9. 企业部署Linux应用将拥有更低的TCO

    650) this.width=650;" onclick='window.open("http://blog.51cto.com/viewpic.php?refimg=" ...

  10. FineUI 页面跳转

    要加 EnableAjax=false; <f:Button ID="btn1" EnableAjax="false" OnClick="btn ...