結果
問題 |
No.44 DPなすごろく
|
ユーザー |
![]() |
提出日時 | 2017-02-14 21:48:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 305 bytes |
コンパイル時間 | 579 ms |
コンパイル使用メモリ | 58,460 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2024-12-29 22:30:53 |
合計ジャッジ時間 | 15,509 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 TLE * 1 |
other | AC * 19 TLE * 1 |
ソースコード
#include <iostream> #include <cstdio> #include <vector> #include <algorithm> #include <utility> using namespace std; int n; int cnt =0; int dfs(int a){ if(a>n){return 0;} if(a==n){cnt+=1; return 0;} dfs(a+2); //a=a-2; dfs(a+1); a=a-1; return cnt; } int main() { cin>>n; cout<<dfs(0)<<endl; }