結果
問題 | No.73 helloworld |
ユーザー |
|
提出日時 | 2020-08-18 07:44:52 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 841 bytes |
コンパイル時間 | 2,018 ms |
コンパイル使用メモリ | 108,856 KB |
最終ジャッジ日時 | 2025-01-13 02:51:57 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 |
ソースコード
#include <stdio.h> #include <iostream> #include <vector> #include <algorithm> #include <map> #include <queue> #include <cstdio> #include <ctime> #include <assert.h> #include <chrono> #include <random> #include <numeric> #include <set> #include <deque> #include <stack> #include <bitset> using namespace std; typedef long long int ll; typedef unsigned long long ull; mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); ll myRand(ll B) { return (ull)rng() % B; } ll cnt[26]; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); for(int i=0;i<26;i++){ cin >> cnt[i]; } ll res=0; for(ll i=1;i<cnt['l'-'a'];i++){ for(ll j=1;j<cnt['o'-'a'];j++){ res=max(res,i*(i-1)/2*(cnt['l'-'a']-i)*j*(cnt['o'-'a']-j)*cnt['h'-'a']*cnt['e'-'a']*cnt['w'-'a']*cnt['d'-'a']*cnt['r'-'a']); } } cout << res << endl; }