結果
問題 | No.700 LOVE |
ユーザー |
![]() |
提出日時 | 2018-06-20 15:59:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 371 bytes |
コンパイル時間 | 1,651 ms |
コンパイル使用メモリ | 159,212 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-22 23:22:39 |
合計ジャッジ時間 | 1,935 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#include <bits/stdc++.h>using namespace std;using i64 = long long;#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)int N,M;int main(){cin >> N >> M;rep(i,0,N - 1){string s;cin >> s;rep(j,0,M - 4){if(s.substr(j,4) == "LOVE"){cout << "YES" << endl;return 0;}}}cout << "NO" << endl;return 0;}