結果

問題 No.700 LOVE
ユーザー yuma220284
提出日時 2019-04-15 22:48:26
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 1,319 ms
コンパイル使用メモリ 160,912 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 23:36:57
合計ジャッジ時間 2,042 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
	int N, M;
	string S;
	bool check = false;
	cin >> N >> M;
	for (int i = 0; i < N; i++) {
		cin >> S;
		for (int j = 0; j < M - 3; j++) {
			if (S.substr(j, 4) == "LOVE") check = true;
		}
	}
	if (check) cout << "YES" << endl;
	else cout << "NO" << endl;
}
0