結果

問題 No.700 LOVE
ユーザー Grenache
提出日時 2018-09-16 17:47:54
言語 Java
(openjdk 23)
結果
AC  
実行時間 141 ms / 2,000 ms
コード長 887 bytes
コンパイル時間 3,478 ms
コンパイル使用メモリ 75,792 KB
実行使用メモリ 41,684 KB
最終ジャッジ日時 2024-07-22 23:31:48
合計ジャッジ時間 6,892 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder700 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int n = sc.nextInt();
		@SuppressWarnings("unused")
		int m = sc.nextInt();
		
		String[] s = new String[n];
		for (int i = 0; i < n; i++) {
			s[i] = sc.next();
		}

		for (int i = 0; i < n; i++) {
			if (s[i].contains("LOVE")) {
				pr.println("YES");
				return;
			}
		}
		
		pr.println("NO");
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0