結果
問題 | No.44 DPなすごろく |
ユーザー | kiridaruma |
提出日時 | 2016-05-16 22:47:19 |
言語 | D (dmd 2.106.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 345 bytes |
コンパイル時間 | 710 ms |
コンパイル使用メモリ | 79,404 KB |
実行使用メモリ | 7,068 KB |
最終ジャッジ日時 | 2023-09-02 21:14:09 |
合計ジャッジ時間 | 9,327 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,368 KB |
testcase_01 | AC | 1 ms
4,372 KB |
testcase_02 | AC | 760 ms
4,368 KB |
testcase_03 | AC | 43 ms
4,372 KB |
testcase_04 | AC | 2 ms
4,372 KB |
testcase_05 | AC | 180 ms
4,368 KB |
testcase_06 | AC | 1 ms
4,368 KB |
testcase_07 | AC | 1 ms
4,368 KB |
testcase_08 | AC | 5 ms
4,372 KB |
testcase_09 | AC | 2 ms
4,372 KB |
testcase_10 | AC | 181 ms
4,368 KB |
testcase_11 | AC | 2 ms
4,368 KB |
testcase_12 | AC | 12 ms
4,372 KB |
testcase_13 | AC | 1 ms
4,368 KB |
testcase_14 | TLE | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
ソースコード
import std.stdio, std.string, std.conv; int n; ulong[] arr; void main(){ n = readln.strip.to!int; arr.length = n+1; hoge(0); arr[n].writeln; } void hoge(int num){ if(num < n-1){ arr[num + 2]++; hoge(num + 2); } if(num < n){ arr[num + 1]++; hoge(num + 1); } }