結果
| 問題 | No.1367 文字列門松 | 
| コンテスト | |
| ユーザー |  rieaaddlreiuu | 
| 提出日時 | 2024-12-05 00:27:52 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 420 bytes | 
| コンパイル時間 | 1,669 ms | 
| コンパイル使用メモリ | 166,092 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-05 00:27:55 | 
| 合計ジャッジ時間 | 2,739 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 WA * 3 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
    string S,T;
    T = "kadomatsu";
    cin >> S;
    int s_index=0,t_index = 0;
    while(s_index < S.size() && t_index < T.size()){
        if(T[t_index] == S[s_index]){
            s_index++;
        } else {
            t_index++;
        }
    }
    if(s_index >= S.size()){
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
}
            
            
            
        