結果
問題 |
No.314 ケンケンパ
|
ユーザー |
|
提出日時 | 2015-12-08 08:16:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 7 ms / 1,000 ms |
コード長 | 583 bytes |
コンパイル時間 | 468 ms |
コンパイル使用メモリ | 55,048 KB |
実行使用メモリ | 11,028 KB |
最終ジャッジ日時 | 2024-09-14 19:33:38 |
合計ジャッジ時間 | 1,244 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
// yukicoder My Practice // author: Leonardone @ NEETSDKASU #include <cstdio> #include <iostream> using namespace std; typedef unsigned long ul; const ul MD = 1000000007UL; // 解説読後 // http://yukicoder.me/problems/882/editorial #define arrlen(x) (sizeof(x) / sizeof((x)[0])) char str[100]; ul a[1000006]; int main() { int n; cin >> n; ul *an = a + 3, *an2 = a + 1, *an3 = a, *enda = a + size_t(n) + 5; *an2 = 1UL; while (an != enda) { *(an++) = ((*(an2++)) + (*(an3++))) % MD; } cout << a[n + 4] << endl; return 0; }