結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
cureskol
|
| 提出日時 | 2020-04-10 05:20:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 242 bytes |
| コンパイル時間 | 1,917 ms |
| コンパイル使用メモリ | 173,124 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 09:57:11 |
| 合計ジャッジ時間 | 2,722 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int F(int a){
return a?a*F(a-1):1;
}
signed main(){
string s;cin>>s;
map<char,int> m;
for(char p:s)m[p]++;
int ans=F(s.size());
for(auto p:m)ans/=F(p.second);
cout<<ans-1<<endl;
}
cureskol