結果
問題 |
No.1186 長方形の敷き詰め
|
ユーザー |
![]() |
提出日時 | 2021-02-12 23:32:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,984 bytes |
コンパイル時間 | 3,987 ms |
コンパイル使用メモリ | 230,860 KB |
実行使用メモリ | 7,252 KB |
最終ジャッジ日時 | 2024-07-20 01:14:29 |
合計ジャッジ時間 | 5,214 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 WA * 3 |
ソースコード
#ifndef ONLINE_JUDGE #define _GLIBCXX_DEBUG #endif #include<bits/stdc++.h> #include<atcoder/all> using namespace std; using namespace atcoder; #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define bit(n,k) (((ll)n>>(ll)k)&1) /*nのk bit目*/ #define pb push_back #define pf push_front #define fi first #define se second #define eb emplace_back #define endl '\n' #define SZ(x) ((ll)(x).size()) #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define debug(v) cout<<#v<<":";for(auto x:v){cout<<x<<' ';}cout<<endl; #define PI 3.14159265359 const double eps = 1e-12; const long long INF= 1e+18+1; typedef double D; // 座標値の型。doubleかlong doubleを想定 typedef complex<D> Point; // Point typedef long long ll; typedef vector<ll> vl; typedef vector<vl>vvl; typedef vector<vvl>vvvl; typedef vector<vvvl>vvvvl; typedef vector<vvvvl>vvvvvl; typedef pair<ll,ll> P; typedef tuple<ll,ll,ll> T; template<class T> using minpq=priority_queue<T,vector<T>,greater<T>>; const ll MOD=1000000007LL; // const ll MOD=998244353LL; const ll mod=MOD; string abc="abcdefghijklmnopqrstuvwxyz"; string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; vl dx={0,0,1,-1,1,1,-1,-1}; vl dy={1,-1,0,0,-1,1,-1,1}; template<class T> vector<T> make_vec(size_t a) { return vector<T>(a); } template<class T, class... Ts> auto make_vec(size_t a, Ts... ts) { return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...)); } template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;} template<class T>bool chmin(T &a,const T &b){if(b<a){a=b;return true;}return false;} using mint=modint1000000007; int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); cout << fixed << setprecision(12); /*--------------------------------*/ ll n,m;cin>>n>>m; vector<modint998244353> dp(m+1); dp[0]=1; for(int i=1;i<=m;i++){ dp[i]+=dp[i-1]; if(i-n>=0)dp[i]+=dp[i-n]; } cout<<dp[m].val()<<endl; }