結果

問題 No.1367 文字列門松
ユーザー 👑 CleyL
提出日時 2022-01-25 00:03:20
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 366 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 64,552 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-15 04:11:23
合計ジャッジ時間 1,347 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    string s;cin>>s;
    string k = "kadomatsu";
    int nw = 0;
    for(int i = 0; s.size() > i; i++){
        while(k[nw] != s[i]){
            nw++;
            if(nw == 9){
                cout << "No" << endl;
                return 0;
            }
        }
        nw++;
    }
    cout << "Yes" << endl;
}
0