結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
IL_msta
|
| 提出日時 | 2015-06-29 11:07:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,239 bytes |
| コンパイル時間 | 718 ms |
| コンパイル使用メモリ | 84,088 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-07 21:08:57 |
| 合計ジャッジ時間 | 1,402 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 7 |
ソースコード
#define _USE_MATH_DEFINES
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <list>
#include <queue>
#include <vector>
#include <complex>
#include <set>
/////////
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define P(p) cout<<(p)<<endl;
/////////
typedef long long LL;
typedef long double LD;
/////////
using namespace::std;
/////////
int main(void){
std::cin.tie(0);
std::ios::sync_with_stdio(false);
std::cout << std::fixed;//
//cout << setprecision(6);//
LL C[26];
rep(i,26){
cin>>C[i];
}
LL ans = 1;
LL ama = 0;
LL big = -1;
LL tbig = 0;
if(C['e'-'a'] < 1){P(0);return 0;}
else{ans *= C['e'-'a'];}
if(C['h'-'a'] < 1){P(0);return 0;}
else{ans *= C['h'-'a'];}
if(C['r'-'a'] < 1){P(0);return 0;}
else{ans *= C['r'-'a'];}
if(C['w'-'a'] < 1){P(0);return 0;}
else{ans *= C['w'-'a'];}
if(C['o'-'a'] < 2){P(0);return 0;}
else{
ama = C['o'-'a']-2;
ans *= (1+ama/2)*(1+ama-ama/2);
}
if(C['l'-'a'] < 3){P(0);return 0;}
else{
ama = C['l'-'a'] - 3 ;
for(int k=0;k<=ama;++k){
tbig = ((k+2)*(k+1)/2) * (ama-k+1);
if(big == -1 || big < tbig){
big = tbig;
}
}
ans *= big;
}
P(ans);
return 0;
}
IL_msta