結果

問題 No.1754 T-block Tiling
ユーザー lemonlemon
提出日時 2021-11-20 14:22:27
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 582 bytes
コンパイル時間 2,571 ms
コンパイル使用メモリ 199,052 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-02 08:31:48
合計ジャッジ時間 3,104 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1LL << 60;
#define rep(i, b) for(ll i=0; i < b; i++)
#define rrep(i, a, b) for(ll i=a; i >= b; i --)
#define fore(i, a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#define mod 998244353

int main(){
    ll k = 100;
    vector<ll> DP(k + 1);
    DP[0] = 1;
    rep(i, k){
        rep(j, k - i){
            DP[i + j + 1] += DP[i] * 2;
            DP[i + j + 1] %= mod;
        }
    }
    int t;
    cin >> t;
    int n;
    rep(_, t){
        cin >> n;
        cout << DP[n] << endl;
    }
}
0