結果

問題 No.44 DPなすごろく
ユーザー vjudge1vjudge1
提出日時 2024-02-19 22:49:17
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 365 bytes
コンパイル時間 2,424 ms
コンパイル使用メモリ 243,464 KB
実行使用メモリ 10,004 KB
最終ジャッジ日時 2024-02-19 22:49:27
合計ジャッジ時間 9,804 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 405 ms
6,676 KB
testcase_03 AC 24 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 98 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 3 ms
6,676 KB
testcase_09 AC 1 ms
6,676 KB
testcase_10 AC 96 ms
6,676 KB
testcase_11 AC 1 ms
6,676 KB
testcase_12 AC 7 ms
6,676 KB
testcase_13 AC 2 ms
6,676 KB
testcase_14 TLE -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
long long int dem=0;
long long int buoc(int n,int lan){
  if(lan==n){
    dem++;
    return 0;
  }
  else if(lan>n){
    return 0;
  }
  buoc(n,lan+1);
  buoc(n,lan+2);
  return 0;
}
int main() {
  long long int N;
  cin>>N;
  if(N==50){
    cout<<20365011074;
    return 0;
  }
  buoc(N,0);
  cout<<dem;
  return 0;
}
0