結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-27 06:19:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 782 bytes |
| コンパイル時間 | 1,254 ms |
| コンパイル使用メモリ | 157,172 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-01 14:50:57 |
| 合計ジャッジ時間 | 2,223 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
ソースコード
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>
#include <ctype.h>
#include <fstream>
#include <cassert>
#include <bits/stdc++.h>
using namespace std;
//#include<bits/stdc++.h>
long long int d[35][35] = {};
int main() {
d[0][0] = 1;
for (int i = 0; i < 33; i++) {
for (int j = 0; j < 33; j++) {
d[i + 1][j] += d[i][j];
d[i + 1][j + 1] += d[i][j];
}
}
int x;
cin >> x;
x = min(x, 32);
cout << d[31][x] << " ";
if (x == 0)cout << 0 << endl;
else cout << d[30][x-1]*INT_MAX;
return 0;
}