結果
問題 |
No.52 よくある文字列の問題
|
ユーザー |
|
提出日時 | 2020-02-11 19:05:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 369 bytes |
コンパイル時間 | 1,416 ms |
コンパイル使用メモリ | 169,572 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-01 08:11:26 |
合計ジャッジ時間 | 1,902 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 8 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ string s;cin >> s; vector<int> d(11); d[0]=1; for(int i=1;i<=10;i++){ d[i]=d[i-1]*i; } vector<int> c(26); int n=s.size(); for(int i=0;i<n;i++){ c[s[i]-'a']++; } int ans=d[n]; for(int i=0;i<26;i++){ ans/=d[c[i]]; } cout << ans << endl; }