結果

問題 No.700 LOVE
ユーザー ut0s
提出日時 2019-08-28 21:31:16
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 1,751 ms
コンパイル使用メモリ 168,656 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 23:40:20
合計ジャッジ時間 2,440 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

/**
  @file 700.cpp
  @title  No.700 LOVE - yukicoder
  @url https://yukicoder.me/problems/no/700
**/

#include <bits/stdc++.h>
using namespace std;

typedef long long LL;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, N) for (int i = 0; i < (N); ++i)

int main() {
  int N, M;
  cin >> N >> M;
  vector<string> A(N, "");

  bool ok = false;
  REP(i, N) {
    cin >> A[i];
    auto pos = A[i].find("LOVE");
    if (pos != string::npos) {
      ok = true;
    }
  }

  string ret = ok ? "YES" : "NO";
  cout << ret << endl;

  return 0;
}
0