結果
| 問題 |
No.420 mod2漸化式
|
| ユーザー |
tetsuzuki1115
|
| 提出日時 | 2017-11-04 14:33:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 861 bytes |
| コンパイル時間 | 766 ms |
| コンパイル使用メモリ | 78,796 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-23 17:54:19 |
| 合計ジャッジ時間 | 2,259 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 34 WA * 1 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;
long long MOD = 1000000007;
int main() {
long long x;
cin >> x;
long long combination[31+1][31+1];
for ( int i = 0; i <= 31; i++ ) {
for ( int j = 0; j <= i; j++ ) {
if ( i == j || j == 0 ) { combination[i][j] = 1; }
else {
combination[i][j] = combination[i-1][j] + combination[i-1][j-1];
}
}
}
if ( x > 31 || x == 0 ) { cout << 0 << " " << 0 << endl; }
else { cout << combination[31][x] << " " << combination[30][x-1] * 2147483647 << endl; }
return 0;
}
tetsuzuki1115