結果
問題 | No.1367 文字列門松 |
ユーザー | rogi52 |
提出日時 | 2022-10-02 21:08:40 |
言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 2,144 ms |
コンパイル使用メモリ | 199,948 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-25 19:34:24 |
合計ジャッジ時間 | 3,572 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); string S; cin >> S; S += '?'; string T = "kadomatsu"; int i = 0; for(char c : T) if(S[i] == c) i++; cout << (S[i] == '?' ? "Yes" : "No") << endl; }