結果
問題 |
No.73 helloworld
|
ユーザー |
![]() |
提出日時 | 2015-07-29 22:59:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 450 ms |
コンパイル使用メモリ | 55,916 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-17 22:27:19 |
合計ジャッジ時間 | 1,135 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 WA * 7 |
ソースコード
#include <iostream> using namespace std; typedef long long LL; LL calc_l(LL n) { LL cnt = 0; for (LL a = 2; a < n; ++a) { LL t = (a * (a - 1) / 2) * (n - a); cnt = max(cnt, t); } return cnt; } int main(int argc, char *argv[]) { LL cnt[256] = {}; for (int i = 'a'; i <= 'z'; ++i) { cin >> cnt[i]; } LL ans = cnt['h'] * cnt['e'] * calc_l(cnt['l']); LL o = cnt['o']; ans *= (o / 2) * (o - o / 2); ans *= cnt['r'] * cnt['w']; cout << ans << endl; return 0; }