結果
問題 | No.73 helloworld |
ユーザー |
|
提出日時 | 2014-11-21 00:20:08 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 865 bytes |
コンパイル時間 | 437 ms |
コンパイル使用メモリ | 58,420 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-28 21:53:39 |
合計ジャッジ時間 | 951 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include <iostream>#include <cmath>using namespace std;typedef long long ll;int cnt[333];int main(){for(char c='a';c<='z';c++){cin >> cnt[c];}ll res = 1;// h e w r dres *= cnt['h'];res *= cnt['e'];res *= cnt['w'];res *= cnt['r'];res *= cnt['d'];{// oint os = cnt['o'];int maxi = 0;for(int i=1;i<os;i++){int j = os - i;maxi = max(maxi, i * j);}res *= maxi;}{// lint ls = cnt['l'];int maxi = 0;for(int i=2;i<ls;i++){int j = ls - i;maxi = max(maxi, i * (i-1) * j / 2);}res *= maxi;}cout << res << endl;return 0;}