結果
| 問題 | 
                            No.1186 長方形の敷き詰め
                             | 
                    
| コンテスト | |
| ユーザー | 
                             mencotton
                         | 
                    
| 提出日時 | 2020-08-22 14:24:59 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 369 bytes | 
| コンパイル時間 | 615 ms | 
| コンパイル使用メモリ | 68,648 KB | 
| 実行使用メモリ | 11,108 KB | 
| 最終ジャッジ日時 | 2024-10-15 08:40:35 | 
| 合計ジャッジ時間 | 1,579 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 WA * 3 | 
ソースコード
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const ll MOD = 998244353;
int main() {
    int n, m;
    cin >> n >> m;
    vector<ll> dp(m + 1);
    dp[0] = 1;
    for (int i = 1; i <= m; i++) {
        dp[i] += dp[i - 1];
        if (i >= n)dp[i] += dp[i - n];
        dp[i] %= MOD;
    }
    cout << dp[m] << endl;
    return 0;
}
            
            
            
        
            
mencotton