結果
| 問題 |
No.44 DPなすごろく
|
| ユーザー |
kiridaruma
|
| 提出日時 | 2016-05-16 22:47:19 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 345 bytes |
| コンパイル時間 | 785 ms |
| コンパイル使用メモリ | 92,892 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-12 03:32:13 |
| 合計ジャッジ時間 | 8,453 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 4 |
| other | AC * 14 TLE * 1 -- * 5 |
ソースコード
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);
}
}
kiridaruma