結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
atetubou
|
| 提出日時 | 2014-11-21 08:51:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,620 bytes |
| コンパイル時間 | 1,756 ms |
| コンパイル使用メモリ | 174,864 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-02 19:54:36 |
| 合計ジャッジ時間 | 2,048 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 7 WA * 7 |
ソースコード
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef ll li;
typedef pair<ll,ll> PI;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define REP(i, n) rep (i, n)
#define F first
#define S second
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SZ(a) (int)((a).size())
#define ALL(a) (a).begin(),(a).end()
#define FLL(a,b) memset((a),b,sizeof(a))
#define CLR(a) memset((a),0,sizeof(a))
#define FOR(it,a) for(__typeof(a.begin())it=a.begin();it!=a.end();++it)
#define FORR(it,a) for(__typeof(a.rbegin())it=a.rbegin();it!=a.rend();++it)
template<typename T,typename U> ostream& operator<< (ostream& out, const pair<T,U>& val){return out << "(" << val.F << ", " << val.S << ")";}
template<class T> ostream& operator<< (ostream& out, const vector<T>& val){out << "{";rep(i,SZ(val)) out << (i?", ":"") << val[i];return out << "}";}
#define declare(a,it) __typeof(a) it=a
const double EPS = 1e-8;
const int dx[]={1,0,-1,0,1,1,-1,-1,0};
const int dy[]={0,1,0,-1,-1,1,-1,1,0};
#define endl '\n'
int main(int argc, char *argv[])
{
int a[26];
rep(i,26) cin >> a[i];
ll ans = 1;
ans *= a['h'-'a'];
ans *= a['e'-'a'];
ans *= a['w'-'a'];
ans *= a['r'-'a'];
ans *= a['d'-'a'];
int o = max(1,a['o'-'a']);
for(int i = 0; i <= a['o'-'a']; ++i){
o = max(o, i * (a['o'-'a']-i));
}
ans *= o;
int l = max(1,a['l'-'a']);
for(int i = 0; i <= a['l'-'a']; ++i){
l = max(l, i * (i-1) / 2 * (a['l'-'a']-i));
}
ans *= l;
cout << ans << endl;
return 0;
}
atetubou