結果
問題 |
No.700 LOVE
|
ユーザー |
|
提出日時 | 2020-05-29 19:00:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 583 bytes |
コンパイル時間 | 1,486 ms |
コンパイル使用メモリ | 168,428 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 23:47:15 |
合計ジャッジ時間 | 2,175 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); i ++) using namespace std; typedef long long ll; typedef pair<ll,ll> PL; typedef pair<int,int> P; const int INF = 1e9; const ll MOD = 1e9 + 7; const double eps = 1e-6; int main(){ int N,M; cin >> N >> M; bool flag = false; rep(i,N){ string S; cin >> S; rep(j,M - 3) { if (S.substr(j,4) == "LOVE") { flag = true; break; } } if (flag) break; } if (flag) cout << "YES" << endl; else cout << "NO" << endl; }