結果

問題 No.700 LOVE
ユーザー 👑 CleyL
提出日時 2018-12-12 14:10:49
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 452 ms
コンパイル使用メモリ 55,456 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 23:34:25
合計ジャッジ時間 1,125 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
  int h,w;
  cin >> h >> w;
  string ok = "NO";
  if(w >= 4){
    for(int i = 0; h > i; i++){
      string tmp; cin >> tmp;
      for(int j = 0; w-3 > j; j++){
        if(tmp[j] == 'L' && tmp[j+1] == 'O' && tmp[j+2] == 'V' && tmp[j+3] == 'E') ok = "YES";
      }
    }
  }
  cout << ok << endl;
}
0