結果
問題 | No.1754 T-block Tiling |
ユーザー | ok |
提出日時 | 2021-11-20 13:14:51 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 619 ms |
コンパイル使用メモリ | 72,060 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-11 06:53:16 |
合計ジャッジ時間 | 1,015 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 |
ソースコード
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; #define int long long constexpr int INF = 1e18; constexpr int MOD = 998244353; signed main(){ int T; cin>>T; for(int i = 0; i < T; i++){ vector<int> dp; int N; cin>>N; dp.resize(N+1); dp[0] = 1; for(int j = 1; j <= N; j++){ for(int k = 1; j-k >= 0; k++){ dp[j] += dp[j-k] * 2; dp[j] %= MOD; } } cout<<dp[N]<<endl; } }