結果

問題 No.741 AscNumber(Easy)
ユーザー 乾麺乾麺
提出日時 2024-04-17 16:41:32
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 142 ms / 2,000 ms
コード長 846 bytes
コンパイル時間 4,039 ms
コンパイル使用メモリ 295,792 KB
実行使用メモリ 89,472 KB
最終ジャッジ日時 2024-04-17 16:41:39
合計ジャッジ時間 6,121 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 1 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 1 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 1 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 1 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 1 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 1 ms
5,376 KB
testcase_27 AC 1 ms
5,376 KB
testcase_28 AC 2 ms
5,376 KB
testcase_29 AC 1 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 1 ms
5,376 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 2 ms
5,376 KB
testcase_34 AC 1 ms
5,376 KB
testcase_35 AC 116 ms
85,504 KB
testcase_36 AC 51 ms
39,296 KB
testcase_37 AC 62 ms
45,568 KB
testcase_38 AC 68 ms
45,056 KB
testcase_39 AC 52 ms
38,528 KB
testcase_40 AC 66 ms
51,072 KB
testcase_41 AC 104 ms
78,336 KB
testcase_42 AC 55 ms
43,136 KB
testcase_43 AC 40 ms
32,000 KB
testcase_44 AC 81 ms
61,952 KB
testcase_45 AC 87 ms
66,688 KB
testcase_46 AC 110 ms
81,408 KB
testcase_47 AC 19 ms
16,640 KB
testcase_48 AC 109 ms
81,536 KB
testcase_49 AC 92 ms
68,608 KB
testcase_50 AC 14 ms
12,288 KB
testcase_51 AC 43 ms
33,664 KB
testcase_52 AC 119 ms
89,472 KB
testcase_53 AC 142 ms
89,344 KB
testcase_54 AC 121 ms
88,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;i++)
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける
using si =vector<char>;
using ssi =vector<si>;
//using mint = modint998244353;
const long long INF = 1e18;
//bit全探索 rep(i,0,1<<(n-1)){rep(j,0,n-1)if(I&(1<<j))}
//int a = s[0] - ‘0’;文字列から数字
//int a=atoi(s.c_str());
//“ABCDEFGHIJKLMNOPQRSTUVWXYZ"
//#define INF (long long)2e+18
const ll MOD=1e9+7;
//printf("%.9f\n", ans);
ll dp[1000010][11];
int main() { ll n;
cin>>n;

dp[0][9]=1;
rep(i,0,n){
rep(j,0,10)rep(k,j,10)dp[i+1][j]+=dp[i][k];
rep(j,0,10)dp[i+1][j]%=MOD;
}
ll ans=0;
rep(i,0,10)ans+=dp[n][i];
ans%=MOD;
cout<<ans;
}
0