結果
問題 |
No.73 helloworld
|
ユーザー |
|
提出日時 | 2020-06-17 16:08:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 5,000 ms |
コード長 | 442 bytes |
コンパイル時間 | 2,884 ms |
コンパイル使用メモリ | 199,152 KB |
最終ジャッジ日時 | 2025-01-11 04:59:44 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }