結果
問題 |
No.1367 文字列門松
|
ユーザー |
![]() |
提出日時 | 2025-03-09 00:53:52 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 3,880 ms |
コンパイル使用メモリ | 275,224 KB |
実行使用メモリ | 8,604 KB |
最終ジャッジ日時 | 2025-03-09 00:53:57 |
合計ジャッジ時間 | 5,178 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); string s; cin >> s; string t = "kadomatsu"; rep(bit, 1 << t.size()) { string u = ""; rep(i, t.size()) { if (bit & (1 << i)) u += t[i]; } if (u == s) { cout << "Yes" << '\n'; return 0; } } cout << "No" << '\n'; return 0; }