結果
問題 |
No.1367 文字列門松
|
ユーザー |
👑 |
提出日時 | 2022-01-25 00:24:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 453 bytes |
コンパイル時間 | 462 ms |
コンパイル使用メモリ | 65,248 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-15 04:41:42 |
合計ジャッジ時間 | 1,281 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#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++){ if(nw == 9){ cout << "No" << endl; return 0; } while(k[nw] != s[i]){ nw++; if(nw == 9){ cout << "No" << endl; return 0; } } nw++; } cout << "Yes" << endl; }