結果
問題 | No.73 helloworld |
ユーザー |
|
提出日時 | 2015-06-19 14:23:54 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 788 bytes |
コンパイル時間 | 539 ms |
コンパイル使用メモリ | 71,520 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-29 02:05:16 |
合計ジャッジ時間 | 1,147 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include <iomanip>#include <iostream>#include <list>#include <map>#include <numeric>#include <queue>#include <set>#include <sstream>#include <stack>#include <string>#include <utility>#include <vector>#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)using namespace std;typedef long long int ll;typedef vector<int> VI;typedef pair<int, int> PI;const double EPS=1e-9;int a[26] = {};int main(void) {REP(i, 0, 26) {cin >> a[i];}ll sum = 1;sum *= a['d' - 'a'];sum *= a['e' - 'a'];sum *= a['h' - 'a'];sum *= a['w' - 'a'];sum *= a['r' - 'a'];int o = a['o' - 'a'];sum *= o / 2 * (o - o / 2);int l = a['l' - 'a'];int ma = 0;REP(i, 0, l) {ma = max(ma, i * (i - 1) / 2 * (l - i));}sum *= ma;cout << sum << endl;}