結果
| 問題 |
No.1367 文字列門松
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-29 21:25:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 473 bytes |
| コンパイル時間 | 817 ms |
| コンパイル使用メモリ | 73,216 KB |
| 最終ジャッジ日時 | 2025-01-18 08:49:16 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#line 1 "main.cpp"
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
void solve() {
string s;
cin >> s;
int i = 0;
for (auto c : s) {
while (i < 9 && c != "kadomatsu"[i]) ++i;
if (i == 9) {
cout << "No\n";
return;
}
++i;
}
cout << "Yes\n";
}
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
solve();
return 0;
}