結果
| 問題 |
No.52 よくある文字列の問題
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-05-10 20:52:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 286 bytes |
| コンパイル時間 | 1,182 ms |
| コンパイル使用メモリ | 166,004 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-05 22:03:06 |
| 合計ジャッジ時間 | 2,936 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
set<string> ss;
void rec(string s, string t){
if(s==""){
ss.insert(t);}
rec(s.substr(1), t + s.substr(0,1));
rec(s.substr(0,s.length()-1), t + s.substr(s.length()-1));
}
int main(){
string s;
cin>>s;
rec(s, "");
cout<<ss.size() << endl;
}