結果

問題 No.1754 T-block Tiling
ユーザー ぷらぷら
提出日時 2021-11-20 14:55:45
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 427 bytes
コンパイル時間 1,902 ms
コンパイル使用メモリ 199,272 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-02 09:15:00
合計ジャッジ時間 2,377 ms
ジャッジサーバーID
(参考情報)
judge13 / judge16
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int t;
    cin >> t;
    while (t--) {
        int n;
        cin >> n;
        n *= 2;
        vector<long long>dp(n+1);
        dp[0] = 1;
        for(int i = 0; i <= n; i++) {
            for(int j = 2; i+j <= n; j += 2) {
                dp[i+j] += dp[i]*2;
                dp[i+j] %= 998244353;
            }
        }
        cout << dp[n] << endl;
    }
}
0