結果
問題 | No.1754 T-block Tiling |
ユーザー | ok |
提出日時 | 2021-11-20 13:14:51 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 486 bytes |
コンパイル時間 | 587 ms |
コンパイル使用メモリ | 71,708 KB |
実行使用メモリ | 4,376 KB |
最終ジャッジ日時 | 2023-09-02 00:28:18 |
合計ジャッジ時間 | 977 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge16 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 2 ms
4,376 KB |
ソースコード
#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; } }