結果
問題 | No.52 よくある文字列の問題 |
ユーザー |
|
提出日時 | 2020-08-18 23:49:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 327 bytes |
コンパイル時間 | 2,271 ms |
コンパイル使用メモリ | 197,920 KB |
最終ジャッジ日時 | 2025-01-13 03:32:35 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 7 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); string s; cin>>s; set<string>st; for(int i=0,lim=s.size()-1;i<(1<<lim);++i){ string res; for(int j=0;j<=lim;++j){ if(i&(1<<j))res+=s.at(j); else res+=s.at(lim-j); } st.insert(res); } cout<<st.size()<<"\n"s; }