結果
| 問題 |
No.700 LOVE
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-07-08 02:44:57 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 487 bytes |
| コンパイル時間 | 459 ms |
| コンパイル使用メモリ | 55,488 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 23:24:58 |
| 合計ジャッジ時間 | 1,198 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
#include<iostream>
#include<string>
int main() {
int a, b;
std::cin >> a >> b;
std::string str;
bool love_flag = false;
for (int i = 0; i<a; i++) {
std::cin >> str;
std::string check_str;
for (int j = 0; j<str.length(); j++) {
check_str += str[j];
if (str[j] == 'L') {
check_str.erase();
check_str += 'L';
}
if (check_str == "LOVE") {
love_flag = true;
}
}
}
if (love_flag) {
std::cout << "YES";
}
else {
std::cout << "NO";
}
return 0;
}