問題一覧 > 通常問題

No.380 Evil Script

レベル : / AI推定難易度 : 600 / 実行時間制限 : 1ケース 1.000秒 / メモリ制限 : 128 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 102
作問者 : LayCurse / テスター : 37zigen
お気に入りにしたユーザー ProblemId : 348 / 自分の提出
問題文最終更新日: 2026-06-25 02:45:12
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 139 (順位表) の他の問題:

Problem Statement

In this problem, a character means a half-width space or a so-called printable character, with an ASCII code between $32$ and $126$, inclusive.
Characters other than lowercase letters, uppercase letters, and digits are called symbols.

An anime has $5$ characters in total: "digi", "petit", "rabi", "gema", and "piyo".
The lines of each anime character have the following properties.

  • Every line of digi ends with nyo, or with nyo followed by 1 to 3 symbols
  • Every line of petit ends with nyu, or with nyu followed by 1 to 3 symbols
  • Every line of rabi contains at least 1 character that is not a symbol
  • Every line of gema ends with gema, or with gema followed by 1 to 3 symbols
  • Every line of piyo ends with pyo, or with pyo followed by 1 to 3 symbols

Note that nyo, nyu, gema, and pyo are case-insensitive (see the samples), but the names of the anime characters are case-sensitive (Digi and the like are not valid names of anime characters).

You are now given a script as input.
Each line of the script is supposed to contain the information of $1$ spoken line: the name of the anime character who speaks it and the content of the spoken line (a printable string of at least 1 character), separated by a half-width space.
However, scripts inevitably contain mistakes.
Write a program that determines, for each line of this script, whether the information of $1$ spoken line is written correctly.
Specifically, for each line, print $\verb|WRONG!|$ if it can be asserted that the information of $1$ spoken line is not written correctly, and print $\verb|CORRECT (maybe)|$ otherwise.
See the samples for the detailed format (the judge tests include the sample cases, so refer to them as well).
The size of the script is said to be at most $100$ KB. Every line, including the last one, properly ends with a newline code $\verb|\n|$.
The script contains nothing other than newline codes and characters with an ASCII code between $32$ and $126$, inclusive.
(However, it is guaranteed that no half-width space appears at the end of a line.)

Sample

Sample 1
Input
digi correct-da-nyo
digi KOREMO CORRECT DA NYO
digi KoReDeMo Correct NanDa Nyo!!
petit petit ha digi ja nai nyo
Output
CORRECT (maybe)
CORRECT (maybe)
CORRECT (maybe)
WRONG!
Sample 2
Input
piyo ganubatte mondai wo toku pyo
petit ue no gyo ha kitto matigatteru nyu
digi demo kakushin ha motenai nyo~-
Output
CORRECT (maybe)
CORRECT (maybe)
CORRECT (maybe)

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。