結果
| 問題 |
No.170 スワップ文字列(Easy)
|
| コンテスト | |
| ユーザー |
prog470
|
| 提出日時 | 2017-07-14 05:54:52 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 737 bytes |
| コンパイル時間 | 1,063 ms |
| コンパイル使用メモリ | 89,828 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-07 19:52:29 |
| 合計ジャッジ時間 | 1,752 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#define CK(N,A,B) (A<=N&&N<B)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define RREP(i,a,b) for(int i=(b-1);a<=i;i--)
#define F first
#define S second
#define ll long long
const int INF = 1e9;
const long long LLINF = 1e18;
using namespace std;
map<int,int> m;
string S;
int ans = 1;
int main(){
cin>>S;
REP(i,0,S.size()) m[S[i]]++;
REP(i,1,S.size()+1) ans *= i;
for(auto mm : m){
int tmp = 1;
REP(i,1,mm.S+1){
tmp *= i;
}
ans /= tmp;
}
cout<<ans-1<<endl;
return 0;
}
prog470