結果
| 問題 | No.73 helloworld |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-17 16:08:09 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 442 bytes |
| 記録 | |
| コンパイル時間 | 1,391 ms |
| コンパイル使用メモリ | 220,016 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-10 18:44:38 |
| 合計ジャッジ時間 | 2,579 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0),ios::sync_with_stdio(false);
map<char,int>m;
for(char c='a';c<='z';++c){
int num; cin>>num;
m[c]=num;
}
string s="hewrd"s;
int64_t ans=1;
for(auto&&i:s){
ans*=m.at(i);
}
int64_t mxl=0;
char i='l';
for(int j=m.at(i)-1,base=m.at(i);j>=2;--j){
mxl=max(mxl,1L*j*(j-1)/2*(base-j));
}
ans*=mxl;
i='o';
ans*=((m.at(i)+1)/2)*(m.at(i)/2);
cout<<ans<<"\n"s;
}