結果
| 問題 |
No.700 LOVE
|
| コンテスト | |
| ユーザー |
gotutiyan
|
| 提出日時 | 2018-07-23 18:27:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 477 bytes |
| コンパイル時間 | 699 ms |
| コンパイル使用メモリ | 69,716 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-29 22:45:05 |
| 合計ジャッジ時間 | 1,503 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 2 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
int main(){
int n,m;
cin>>n>>m;
if(m<4){
cout<<"NO"<<endl;
return 0;
}
rep(i,0,n){
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;
}
gotutiyan