結果
| 問題 |
No.1367 文字列門松
|
| コンテスト | |
| ユーザー |
zumin
|
| 提出日時 | 2021-03-13 16:01:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 425 bytes |
| コンパイル時間 | 734 ms |
| コンパイル使用メモリ | 74,620 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 07:04:57 |
| 合計ジャッジ時間 | 1,759 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#include <iostream>
#include <set>
using namespace std;
int main(){
string s,t="kadomatsu";
cin>>s;
set<string> chk;
for(int i=0;i<(1<<t.length());i++){
string tmp="";
for(int j=0;j<t.length();j++){
if((i>>j)&1) tmp=tmp+t[j];
}
chk.insert(tmp);
}
if(chk.count(s)){
cout<<"Yes"<<endl;
}else{
cout<<"No"<<endl;
}
return 0;
}
zumin