結果
問題 | No.73 helloworld |
ユーザー |
![]() |
提出日時 | 2016-08-09 13:17:54 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 1,110 bytes |
コンパイル時間 | 753 ms |
コンパイル使用メモリ | 81,572 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-29 14:13:54 |
合計ジャッジ時間 | 1,276 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include<iostream> #include<sstream> #include<cstdio> #include<cstring> #include<string> #include<vector> #include<list> #include<queue> #include<stack> #include<utility> #include <fstream> #include<set> #include<map> #include<cctype> #include<cmath> #include<algorithm> #include <numeric> using namespace std; #define RALL(x) (x).rbegin(),(x).rend() #define ALL(x) (x).begin(),(x).end() #define repp(i,n) for(int (i)=1;(i)<=(n);(i)++) #define rep(i,n) for(int (i)=0;(i)<(n);(i)++) #define rev(i,n) for(int (i)=(n-1);(i)>=0;(i)--) #define clr(a) memset((a), 0 ,sizeof(a)) #define found(s,e) ((s).find(e)!=(s).end()) typedef pair<int,int> P; typedef vector<pair<int,int> > pii; typedef map<string,int> mdi; // not.. int A[26]; long long res; int get(int a){ int i,res=0; for(i=0;i<a+1;i++){ res=max(res,(i*(i-1)/2)*(a-i)); } return res; } int main(){ int i,j,k,a; for(i=0;i<26;i++) cin >> A[i]; res=A['h'-'a']; res*=A['e'-'a']; res*=A['w'-'a']; res*=A['r'-'a']; res*=A['d'-'a']; a=A['l'-'a']; res*=get(a); a=A['o'-'a']; res*=a/2; a-=a/2; res*=a; cout << res << endl; return 0; }