結果
問題 |
No.170 スワップ文字列(Easy)
|
ユーザー |
![]() |
提出日時 | 2021-03-09 21:52:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 15 ms / 5,000 ms |
コード長 | 677 bytes |
コンパイル時間 | 1,014 ms |
コンパイル使用メモリ | 101,048 KB |
実行使用メモリ | 6,656 KB |
最終ジャッジ日時 | 2024-10-11 12:36:46 |
合計ジャッジ時間 | 2,138 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <stdio.h> #include <iomanip> #include <map> #include <set> #include <math.h> using namespace std; #define rep(i,n) for(int i = 0; i < (n); i++) typedef long long ll; typedef long double lld; const int MOD = 1000000007; const lld PI = 3.14159265358979; double f (double a , double b) { if (a > b) return b; else return a; } int main () { cout << fixed << setprecision(15); string s; cin >> s; map<string , int> mp; sort(s.begin() , s.end()); do { mp[s]++; } while (next_permutation(s.begin(), s.end())); cout << mp.size() - 1 << endl; return 0; }