結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
41,152 KB
testcase_01 AC 126 ms
40,520 KB
testcase_02 AC 127 ms
41,264 KB
testcase_03 AC 113 ms
40,228 KB
testcase_04 AC 293 ms
45,332 KB
testcase_05 AC 399 ms
47,572 KB
testcase_06 AC 379 ms
46,716 KB
testcase_07 TLE -
testcase_08 AC 213 ms
42,732 KB
testcase_09 AC 305 ms
46,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no380;

import java.io.PrintWriter;
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);
		PrintWriter pw = new PrintWriter(System.out);
		while(sc.hasNextLine()) {
			String s = sc.nextLine();
			boolean correct = false;
			for(Pattern pat: patterns) {
				if (pat.matcher(s).matches()) {
					correct = true;
					break;
				}
			}
			if (correct) {
				pw.println("CORRECT (maybe)");
			}else{
				pw.println("WRONG!");
			}
			pw.flush();
		}
	}
}
0