結果
| 問題 |
No.52 よくある文字列の問題
|
| コンテスト | |
| ユーザー |
HeyHey0111
|
| 提出日時 | 2016-03-07 21:57:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 540 bytes |
| コンパイル時間 | 633 ms |
| コンパイル使用メモリ | 69,864 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-22 05:25:39 |
| 合計ジャッジ時間 | 1,171 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
#include<iostream>
#include<string>
#include<vector>
#include<set>
using namespace std;
set<string> sum;
int main(){
string s;
vector<string> v;
cin >> s;
for(long long i=0;i<(1LL<<s.size());i++){
string buf,tmp=s;
for(int j=0;j<s.size();j++){
if( (i >> j) & 1LL ){
buf+=tmp.back();
tmp.pop_back();
}else{
buf+=tmp[0];
tmp.erase(tmp.begin());
}
}
sum.insert(buf);
}
cout<< sum.size()<<endl;
return 0;
}
HeyHey0111