cf Baby Bites (字符串)

http://codeforces.com/gym/101933/problem/B

Baby Bites

time limit per test

1.0 s

memory limit per test

256 MB

input

standard input

output

standard output

Arild just turned 11 year old, and is currently learning how to count. His favorite thing to count is how many mouthfuls he has in a meal: every time he gets a bite, he will count it by saying the number out loud.

Unfortunately, talking while having a mouthful sometimes causes Arild to mumble incomprehensibly, making it hard to know how far he has counted. Sometimes you even suspect he loses his count! You decide to write a program to determine whether Arild's counting makes sense or not.

Input

The first line of input contains an integer nn (1≤n≤10001≤n≤1000), the number of bites Arild receives. Then second line contains nn space-separated words spoken by Arild, the ii'th of which is either a non-negative integer aiai (0≤ai≤100000≤ai≤10000) or the string "mumble".

Output

If Arild's counting might make sense, print the string "makes sense". Otherwise, print the string "something is fishy".

Examples

input

Copy

5
1 2 3 mumble 5

output

Copy

makes sense

input

Copy

8
1 2 3 mumble mumble 7 mumble 8

output

Copy

something is fishy

input

Copy

3
mumble mumble mumble

output

Copy

makes sense

#include<bits/stdc++.h>
using namespace std;

bool check(string s, int x)
{
	return s == to_string(x);
}

int main()
{
	int n; string s;
	bool flag = true;
	cin >> n;
	for(int i = 1; i <= n; i++)
	{
		cin >> s;
		if(s != "mumble" && !check(s, i))
			flag = false;
	}
	
	if(flag)
		cout << "makes sense" << endl;
	else
		cout << "something is fishy" << endl;
		
	return 0;
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值