結果
問題 | No.741 AscNumber(Easy) |
ユーザー |
|
提出日時 | 2024-07-25 09:27:42 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 648 ms / 2,000 ms |
コード長 | 931 bytes |
コンパイル時間 | 1,625 ms |
コンパイル使用メモリ | 166,480 KB |
実行使用メモリ | 97,280 KB |
最終ジャッジ日時 | 2024-07-25 09:27:54 |
合計ジャッジ時間 | 11,733 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 55 |
ソースコード
#include <bits/stdc++.h>#include <cmath>//#include <ranges>using ll=long long;#define rep(i,a,b) for(int i=a;i<b;i++)#define chmin(x,b) x=min(x,b)using namespace std;using P=pair<int,int>;using PD=pair<double,double>;using PL=pair<ll,ll>;int mod1=998244353;int mod2=1000000007;const ll INF = 1000000000000000000;const int big = 2147483647;struct st{ll x,y,z;st(ll x=0,ll y=0,ll z=0):x(x),y(y),z(z){}bool operator>(const st &a)const{return x>a.x;}};ll dp[1000010][12];int main(){ll n,q,x,y,z=0,i,d=0,k=0,nk,sum=0,r=0;ll ans=2e9+10,sum2=0,rs=-1e9,cs=0,l=0,w=0,X;ll tmp2=0,flag=0,a=0,b=0,c=0,j=0,m=0,p,mon,rt,ct,h,N;int M,S,K,low,high,colo=0,T;cin>>N;dp[0][0]=1;rep(i,0,N){rep(j,0,10){rep(k,j,10){(dp[i+1][k]+=dp[i][j])%=mod2;}}}rep(j,0,10)(sum+=dp[N][j])%=mod2;cout<<sum<<endl;}