結果
問題 | No.52 よくある文字列の問題 |
ユーザー |
![]() |
提出日時 | 2020-03-25 16:44:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 1,367 ms |
コンパイル使用メモリ | 166,428 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2025-01-01 23:58:48 |
合計ジャッジ時間 | 1,921 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ string s;cin>>s; set<string> se; int n=s.size(); for(int i=0;i<(1<<n);i++){ string res;int pre=0,ba=n-1; for(int j=0;j<n;j++){ if((i>>j)&1)res+=s[pre++]; else res+=s[ba--]; } se.insert(res); } cout<<se.size()<<endl; }