結果

問題 No.73 helloworld
ユーザー KKT89KKT89
提出日時 2020-08-18 07:44:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 841 bytes
コンパイル時間 1,077 ms
コンパイル使用メモリ 115,104 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-20 01:52:48
合計ジャッジ時間 1,706 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 1 ms
6,944 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 2 ms
6,944 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 AC 1 ms
6,944 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0