結果

問題 No.170 スワップ文字列(Easy)
ユーザー cocolleague
提出日時 2017-01-28 23:25:56
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 16 ms / 5,000 ms
コード長 238 bytes
コンパイル時間 2,078 ms
コンパイル使用メモリ 168,952 KB
実行使用メモリ 6,656 KB
最終ジャッジ日時 2024-12-23 21:29:26
合計ジャッジ時間 2,735 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
map<string,int> table;
int main(void){
	string s;
	cin >> s;
	sort(s.begin(),s.end());
	do{
		table[s] = 1;
	}while(next_permutation(s.begin(),s.end()));
	cout << table.size() - 1 << endl;
}
	
0