結果
問題 | No.73 helloworld |
ユーザー | ngtkana |
提出日時 | 2020-03-26 12:55:37 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 650 bytes |
コンパイル時間 | 2,282 ms |
コンパイル使用メモリ | 193,904 KB |
最終ジャッジ日時 | 2025-01-09 10:20:56 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include<bits/stdc++.h> using lint=long long; int main(){ std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false); std::cout.setf(std::ios_base::fixed);std::cout.precision(15); std::vector<lint>a(26); for(lint&x:a)std::cin>>x; lint ans=1; ans*=a.at('h'-'a'); ans*=a.at('e'-'a'); // l // l // o ans*=a.at('w'-'a'); // o ans*=a.at('r'-'a'); // l ans*=a.at('d'-'a'); lint l=a.at('l'-'a'); lint o=a.at('o'-'a'); ans*=(o/2)*((o+1)/2); lint max=0; for(lint i=1;i<=l;i++){ lint now=i*(i-1)*(l-i)/2; if(max<now)max=now; } std::cout<<ans*max<<'\n'; }