結果

問題 No.700 LOVE
ユーザー ugis_prog
提出日時 2018-06-26 20:20:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 447 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 60,104 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-30 22:58:11
合計ジャッジ時間 1,280 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<vector>
using namespace std;

int main(){
    int N,M;
    cin>>N>>M;
    vector<string> S(N);
    for(int i=0;i<N;i++){
        cin>>S[i];
    }
    
    bool LOVE = false;

    for(int i=0;i<N;i++){
        for(int j=0;j<(M-4);j++){
            string s = S[i].substr(j,j+3);
            if(s == "LOVE") LOVE = true;
            
        }
    }

    if(LOVE) cout<<"YES\n";
    else cout<<"NO\n";

}
0