結果
| 問題 | No.52 よくある文字列の問題 |
| コンテスト | |
| ユーザー |
fiord
|
| 提出日時 | 2015-06-10 23:34:00 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 615µs | |
| コード長 | 425 bytes |
| 記録 | |
| コンパイル時間 | 377 ms |
| コンパイル使用メモリ | 82,664 KB |
| 実行使用メモリ | 9,696 KB |
| 最終ジャッジ日時 | 2026-09-02 05:09:10 |
| 合計ジャッジ時間 | 1,375 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
#include <iostream>
#include <string>
#include <set>
using namespace std;
int main(){
string s; cin>>s;
set<string> dic;
int cnt=1<<(int)s.size();
for(int t=0;t<cnt;t++){
string temp;
int num=t;
int f=0,b=(int)s.size()-1;
while(s.size()>temp.size()){
if(num%2) temp+=s[f++];
else temp+=s[b--];
num>>=1;
}
if(dic.find(temp)==dic.end()) dic.insert(temp);
}
cout<<(int)dic.size()<<endl;
return 0;
}
fiord