結果
| 問題 | No.73 helloworld |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-12-30 10:44:20 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 504 bytes |
| 記録 | |
| コンパイル時間 | 2,765 ms |
| コンパイル使用メモリ | 274,948 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-12-30 10:44:24 |
| 合計ジャッジ時間 | 3,857 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void) {
vector<int> cnt(26);
for(int i = 0; i < 26; ++i) cin >> cnt[i];
ll ans = 1;
ans *= cnt['d' - 'a'];
ans *= cnt['e' - 'a'];
ans *= cnt['h' - 'a'];
ans *= cnt['r' - 'a'];
ans *= cnt['w' - 'a'];
int oc = cnt['o' - 'a'];
ans *= (oc / 2) * ((oc + 1) / 2);
int lc = cnt['l' - 'a'], m = 0;
for(int i = 2; i < lc; ++i) m = max(m, i * (i - 1) / 2 * (lc - i));
ans *= m;
cout << ans << "\n";
return 0;
}