結果
問題 |
No.52 よくある文字列の問題
|
ユーザー |
|
提出日時 | 2019-08-03 21:14:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 423 bytes |
コンパイル時間 | 2,140 ms |
コンパイル使用メモリ | 200,040 KB |
最終ジャッジ日時 | 2025-01-07 10:39:04 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; int n = s.size(); set<string> se; for (int i=0;i<1<<n;i++) { string t; int l = 0; int r = n-1; for (int j=0;j<n;j++) { if (i&1<<j) t += s[l++]; else t += s[r--]; } se.insert(t); } cout << se.size() <<endl; return 0; }