結果
| 問題 |
No.420 mod2漸化式
|
| ユーザー |
okayunonaha
|
| 提出日時 | 2016-09-18 03:31:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 492 bytes |
| コンパイル時間 | 579 ms |
| コンパイル使用メモリ | 55,260 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-17 08:22:38 |
| 合計ジャッジ時間 | 2,597 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 32 RE * 3 |
ソースコード
#include <iostream>
using namespace std;
typedef long long ll;
#define int ll
// start
int comb[32][32];
int C(int n, int k) {
if(comb[n][k]) return comb[n][k];
else if(n == k || !k) return comb[n][k] = 1;
return comb[n][k] = C(n-1, k) + C(n-1, k-1);
}
//end
signed main(void) {
int x, m = 2, Count, nsum, lastn;
Count = nsum = 0;
m <<= 30;
m--;
cin >> x;
Count = C(31, x);
if(x!=0) nsum = C(30, x-1) * 2147483647;
cout << Count << " " << nsum << endl;
return 0;
}
okayunonaha