結果
| 問題 | No.700 LOVE | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2018-12-10 12:39:54 | 
| 言語 | Java (openjdk 23) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 139 ms / 2,000 ms | 
| コード長 | 479 bytes | 
| コンパイル時間 | 2,152 ms | 
| コンパイル使用メモリ | 74,132 KB | 
| 実行使用メモリ | 41,732 KB | 
| 最終ジャッジ日時 | 2024-07-22 23:34:33 | 
| 合計ジャッジ時間 | 5,372 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 16 | 
ソースコード
import java.util.Scanner;
  
  public class Main {
      public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          
          int N = sc.nextInt();
          int M = sc.nextInt();
          String flag = "NO";
          
          for(int i=0; i<=N; i++){
              String s = sc.nextLine();
              if(s.contains("LOVE")){
                  flag="YES";
              }
          }
          System.out.println(flag);
      }
  }
            
            
            
        