結果
問題 |
No.1367 文字列門松
|
ユーザー |
|
提出日時 | 2021-01-29 22:04:34 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 699 bytes |
コンパイル時間 | 1,808 ms |
コンパイル使用メモリ | 196,988 KB |
最終ジャッジ日時 | 2025-01-18 09:14:49 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
/** * author: shu8Cream * created: 29.01.2021 20:56:25 **/ #include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair<int,int>; using vi = vector<int>; using vvi = vector<vi>; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); string s; cin >> s; string key = "kadomatsu"; int pos=-1; bool ok = false; vector<string> ans; rep(s,1<<9){ string tmp; rep(i,9){ if(s>>i&1) tmp+=key[i]; } ans.push_back(tmp); } rep(i,ans.size()) if(s==ans[i]) ok=true; cout << (ok ? "Yes" : "No") << endl; }