結果
問題 |
No.1367 文字列門松
|
ユーザー |
![]() |
提出日時 | 2024-12-05 00:29:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 1,484 ms |
コンパイル使用メモリ | 166,268 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-05 00:29:18 |
合計ジャッジ時間 | 2,775 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#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++; t_index++; } else { t_index++; } } if(s_index >= S.size()){ cout << "Yes" << endl; } else { cout << "No" << endl; } }