結果
問題 | No.1367 文字列門松 |
ユーザー |
![]() |
提出日時 | 2021-01-29 22:24:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 554 bytes |
コンパイル時間 | 2,103 ms |
コンパイル使用メモリ | 192,232 KB |
最終ジャッジ日時 | 2025-01-18 09:24:30 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)#define ALL(v) v.begin(),v.end()typedef long long ll;#include <bits/stdc++.h>using namespace std;bool iskado(int x,int y,int z){if(y>x && y>z && x!=z) return true;if(y<x && y<z && x!=z) return true;return false;}int main(){string s;cin>>s;string k="kadomatsu";int now=0;for(int i=0;i<s.size();i++){while(s[i]!=k[now] && now<9){now++;}if(now==9){cout<<"No"<<endl;return 0;}now++;}cout<<"Yes"<<endl;return 0;}