結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-17 09:02:11 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 1,000 ms |
| + 365µs | |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 1,387 ms |
| コンパイル使用メモリ | 179,256 KB |
| 実行使用メモリ | 9,896 KB |
| 最終ジャッジ日時 | 2026-10-07 05:01:22 |
| 合計ジャッジ時間 | 3,187 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
long long c[32][32],x;
for(int i=0;i<32;i++) c[i][i]=c[i][0]=1;
for(int i=2;i<32;i++) {
for(int j=1;j<i;j++) c[i][j]=c[i-1][j]+c[i-1][j-1];
}
cin >> x;
if(x<32) cout << c[31][x] << " " << ((1LL<<31)-1)*(x?c[30][x-1]:0) << endl;
else cout << 0 << " " << 0 << endl;
return 0;
}