結果
| 問題 | No.1367 文字列門松 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-12-11 02:01:22 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 440 bytes |
| 記録 | |
| コンパイル時間 | 1,106 ms |
| コンパイル使用メモリ | 214,108 KB |
| 実行使用メモリ | 7,968 KB |
| 最終ジャッジ日時 | 2026-06-24 14:08:28 |
| 合計ジャッジ時間 | 2,201 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
string s;
cin >> s;
string t = "kadomatsu";
int n = t.length();
for(int i=0;i<(1<<n);i++)
{
string S;
for(int j=0;j<n;j++)
{
if((i&(1<<j)))
{
S += t[j];
}
}
if(S==s)
{
cout << "Yes" << '\n';
return 0;
}
}
cout << "No" << '\n';
return 0;
}