結果

問題 No.380 悪の台本
ユーザー ぴろずぴろず
提出日時 2017-01-25 01:35:58
言語 Java21
(openjdk 21)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 837 bytes
コンパイル時間 2,250 ms
コンパイル使用メモリ 74,192 KB
実行使用メモリ 55,068 KB
最終ジャッジ日時 2024-04-24 14:54:35
合計ジャッジ時間 5,953 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
41,356 KB
testcase_01 AC 137 ms
41,120 KB
testcase_02 AC 114 ms
39,976 KB
testcase_03 AC 124 ms
41,140 KB
testcase_04 AC 281 ms
44,796 KB
testcase_05 AC 395 ms
48,860 KB
testcase_06 AC 358 ms
46,524 KB
testcase_07 TLE -
testcase_08 AC 207 ms
42,780 KB
testcase_09 AC 300 ms
46,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no380;

import java.util.Scanner;
import java.util.regex.Pattern;

public class Main {
	//無理
	public static Pattern[] patterns = {
			Pattern.compile("digi +.*[nN][yY][oO][^a-zA-Z0-9]{0,3}"),
			Pattern.compile("petit +.*[nN][yY][uU][^a-zA-Z0-9]{0,3}"),
			Pattern.compile("rabi +.*[a-zA-Z0-9]+.*"),
			Pattern.compile("gema +.*[gG][eE][mM][aA][^a-zA-Z0-9]{0,3}"),
			Pattern.compile("piyo +.*[pP][yY][oO][^a-zA-Z0-9]{0,3}"),};
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNextLine()) {
			String s = sc.nextLine();
			boolean correct = false;
			for(Pattern pat: patterns) {
				if (pat.matcher(s).matches()) {
					correct = true;
					break;
				}
			}
			if (correct) {
				System.out.println("CORRECT (maybe)");
			}else{
				System.out.println("WRONG!");
			}
		}
	}

}
0