結果
| 問題 |
No.73 helloworld
|
| コンテスト | |
| ユーザー |
otsnsk
|
| 提出日時 | 2014-12-27 18:32:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 1,153 bytes |
| コンパイル時間 | 505 ms |
| コンパイル使用メモリ | 64,160 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-28 22:03:11 |
| 合計ジャッジ時間 | 1,073 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
#include <iostream>
#include <set>
#define FORR(i,b,e) for(int i=(b);i<(int)(e);++i)
#define FOR(i,e) FORR(i,0,e)
#define dump(var) cerr << #var ": " << var << "\n"
#define dumpc(con) for(auto& e: con) cerr << e << " "; cerr<<"\n"
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
ull pt[105][105];
void calc_pascal() {
pt[0][0] = 1;
FORR(i, 1, 101) {
pt[i][0] = 1;
FORR(j, 1, i+2) {
pt[i][j] = pt[i-1][j-1] + pt[i-1][j];
}
}
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
calc_pascal();
set<int> g1 = {7, 4, 22, 17, 3}, g2 = {11, 14};
int C;
ull n = 1;
FOR(i, 26) {
cin >> C;
if (g1.find(i) != g1.end()) {
n *= C;
}
else if (i == 14) { // 'o'
n *= C/2 * (C-C/2);
}
else if (i == 11) { // 'l'
if (C < 3) n *= 0;
else {
ull m = 0;
FORR(k, 2, C) {
m = max(m, pt[k][2] * (C-k));
}
n *= m;
}
}
}
cout << n << endl;
return 0;
}
otsnsk