結果

問題 No.73 helloworld
コンテスト
ユーザー kotatsugame
提出日時 2026-01-23 11:38:41
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 431 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 597 ms
コンパイル使用メモリ 75,396 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-01-23 11:38:43
合計ジャッジ時間 1,388 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<cassert>
using namespace std;
int C[26];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	for(int i=0;i<26;i++)cin>>C[i];
	long ans=1;
	ans*=C['h'-'a'];
	ans*=C['e'-'a'];
	{
		int v=C['l'-'a'];
		int mx=0;
		for(int x=2;x<v;x++)mx=max(mx,x*(x-1)/2*(v-x));
		ans*=mx;
	}
	{
		int v=C['o'-'a'];
		ans*=v/2*(v-v/2);
	}
	ans*=C['w'-'a'];
	ans*=C['r'-'a'];
	ans*=C['d'-'a'];
	cout<<ans<<endl;
}
0