結果
問題 |
No.420 mod2漸化式
|
ユーザー |
![]() |
提出日時 | 2016-09-18 03:34:36 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 438 bytes |
コンパイル時間 | 780 ms |
コンパイル使用メモリ | 53,724 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-17 08:22:41 |
合計ジャッジ時間 | 1,937 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 31 WA * 1 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, Count, nsum; cin >> x; Count = C(31, x); if(x!=0) nsum = C(30, x-1) * 2147483647; cout << Count << " " << nsum << endl; return 0; }