結果

問題 No.73 helloworld
ユーザー dnishdnish
提出日時 2017-07-11 23:46:30
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 473 bytes
コンパイル時間 1,454 ms
コンパイル使用メモリ 164,504 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-12 13:19:33
合計ジャッジ時間 2,193 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 2 ms
4,384 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define REP(i,n,N) for(int i=(n);i<(int) N;i++)
#define p(s) cout<<(s)<<endl
typedef long long ll;
using namespace std;

ll C[30];

int main(){
	REP(i,0,26)	cin>>C[i];
	ll d=C[3];
	ll e=C[4];
	ll h=C[7];
	ll l=C[11];
	ll o=C[14];
	ll r=C[17];
	ll w=C[22];
	ll ans=d*e*h*r*w;
	ll mxl = 0, mxo = 0;
	REP(i,2,l){
		ll tmp = (i*(i-1)/2) * (l-i);
		mxl=max(mxl,tmp);
	}
	REP(i,1,o){
		ll tmp = i*(o-i);
		mxo=max(mxo,tmp);
	}
	ans *= mxl*mxo;
	p(ans);
}
0