結果

問題 No.170 スワップ文字列(Easy)
ユーザー kroton
提出日時 2015-03-23 00:42:19
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 226 bytes
コンパイル時間 1,583 ms
コンパイル使用メモリ 159,348 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-23 00:16:37
合計ジャッジ時間 2,123 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
	string S;
	cin >> S;

	int res = 0;
	string T = S;
	
	do {
		++res;
		next_permutation(T.begin(), T.end());
	} while(T != S);

	cout << res - 1 << endl;
	return 0;
}
0