結果
| 問題 |
No.420 mod2漸化式
|
| コンテスト | |
| ユーザー |
rsk0315
|
| 提出日時 | 2019-03-28 17:10:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 1,199 bytes |
| コンパイル時間 | 2,354 ms |
| コンパイル使用メモリ | 48,128 KB |
| 最終ジャッジ日時 | 2025-01-07 00:35:29 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 35 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:43:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
43 | scanf("%d", &x);
| ~~~~~^~~~~~~~~~
ソースコード
#include <cstdio>
#include <cstdint>
#include <vector>
#include <utility>
std::vector<std::pair<intmax_t, intmax_t>> res = {
{1, 0},
{31, 2147483647},
{465, 64424509410},
{4495, 934155386445},
{31465, 8718783606820},
{169911, 58851789346035},
{736281, 306029304599382},
{2629575, 1275122102497425},
{7888725, 4371847208562600},
{20160075, 12569060724617475},
{44352165, 30724370660176050},
{84672315, 64521178386369705},
{141120525, 117311233429763100},
{206253075, 185742786263791575},
{265182525, 257182319442172950},
{300540195, 312292816465495725},
{300540195, 333112337563195440},
{265182525, 312292816465495725},
{206253075, 257182319442172950},
{141120525, 185742786263791575},
{84672315, 117311233429763100},
{44352165, 64521178386369705},
{20160075, 30724370660176050},
{7888725, 12569060724617475},
{2629575, 4371847208562600},
{736281, 1275122102497425},
{169911, 306029304599382},
{31465, 58851789346035},
{4495, 8718783606820},
{465, 934155386445},
{31, 64424509410},
{1, 2147483647}
};
int main() {
int x;
scanf("%d", &x);
if (x > 31) return puts("0 0"), 0;
printf("%jd %jd\n", res[x].first, res[x].second);
}
rsk0315