結果
| 問題 | No.73 helloworld |
| コンテスト | |
| ユーザー |
a01sa01to
|
| 提出日時 | 2025-01-17 00:37:48 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 668 bytes |
| コンパイル時間 | 4,900 ms |
| コンパイル使用メモリ | 273,256 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-17 00:38:01 |
| 合計ジャッジ時間 | 4,512 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "settings/debug.cpp"
#else
#define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
vector<int> cnt(26, 0);
rep(i, 26) cin >> cnt[i];
auto f = [&](char c) -> int {
return cnt[c - 'a'];
};
// h e ll o w o r l d
// hewrd lll oo
ll ans = 0;
for (int x = 1; x < f('o'); ++x) {
for (int y = 1; y < f('l'); ++y) {
ans = max(ans, 1LL * f('h') * f('e') * f('w') * f('r') * f('d') * x * (f('o') - x) * y * (y - 1) / 2 * (f('l') - y));
}
}
cout << ans << endl;
return 0;
}
a01sa01to