当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1631:Loglan-A Logical Language

题目描述
Loglan is a synthetic speakable language designed to test some of the fundamental problems of linguistics, such as the Sapir Whorf hypothesis. It is syntactically unambiguous, culturally neutral and metaphysically parsimonious. What follows is a gross over-simplification of an already very small grammar of some 200 rules.

Loglan sentences consist of a series of words and names, separated by spaces, and are terminated by a period (.). Loglan words all end with a vowel; names, which are derived extra-linguistically, end with a consonant. Loglan words are divided into two classes--little words which specify the structure of a sentence, and predicates which have the form CCVCV or CVCCV where C represents a consonant and V represents a vowel (see examples later).

The subset of Loglan that we are considering uses the following grammar:



Write a program that will read a succession of strings and determine whether or not they are correctly formed Loglan sentences.
输入解释
Each Loglan sentence will start on a new line and will be terminated by a period (.). The sentence may occupy more than one line and words may be separated by more than one whitespace character. The input will be terminated by a line containing a single `#'. You can assume that all words will be correctly formed.

Output will consist of one line for each sentence containing either `Good' or `Bad!'.
输入样例
la mutce bunbo mrenu bi ditca.
la fumna bi le mrenu.
djan ga vedma le negro ketpi.
#
输出样例
Good
Bad!
Good
来自杭电HDUOJ的附加信息
Recommend LL

该题目是Virtual Judge题目,来自 杭电HDUOJ

题目来源 uva

源链接: HDU-1631

最后修改于 2020-10-25T22:46:39+00:00 由爬虫自动更新

共提交 144

通过率 47.22%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)