結果
| 問題 | No.700 LOVE |
| コンテスト | |
| ユーザー |
f843nmfwisfeuw
|
| 提出日時 | 2020-08-15 13:21:24 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 424µs | |
| コード長 | 737 bytes |
| 記録 | |
| コンパイル時間 | 512 ms |
| コンパイル使用メモリ | 106,724 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-23 15:13:53 |
| 合計ジャッジ時間 | 1,836 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
#include <bitset>
#include <cassert>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
if (m < 4) {
cout << "NO" << endl;
} else {
for (int i = 0; i < n; ++i) {
string S;
cin >> S;
for (int j = 0; j < m - 4 + 1; ++j) {
if (S.substr(j, 4) == "LOVE") {
cout << "YES" << endl;
return 0;
}
}
}
cout << "NO" << endl;
}
return 0;
}
f843nmfwisfeuw